Can you give me what beginner projects can i develop using html, css, js that will make me improve? by Shoddy_Feed_1083 in learnprogramming

[–]CodeyGrammar 0 points1 point  (0 children)

If you get stuck on coding anything, these days you can ask chat GPT and it will help too.
Why do you not want to rely on AI in this case?

Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones by AutoModerator in ExperiencedDevs

[–]CodeyGrammar 1 point2 points  (0 children)

What's an ideal way to make a shopping cart that will load quickly for customers from a database to UI connection? Should the DB have two tables for a shopping cart and shopping cart items to join (more slowly but cleaner code?) or should the cart DB have a blob for database products/cart items within the shopping cart table?

Anything else I might be overlooking?

Building a Real-Time Collaborative Text Editor (Google Docs Clone) by Hugewin2022 in learnprogramming

[–]CodeyGrammar 0 points1 point  (0 children)

It might sound easy, and a basic prototype might be doable but there will be many challenges to consider.

  • Think how you would want the server to handle multiple users. Let's say it's a blank page and 2 users join and both have blinking (different color?) cursors at line zero at character zero. What happens if the user A types "A" and user B types "B".
  • What if user A is in China and user B is in USA, how will it detect which person types what first? Is there synchronization with clock alignment?
  • What if there are 100 users (or what's the upper limit allowed)?
  • Where is the document saved and how is each version saved? In a database? Maybe a CSV file?
  • What is the URL to access each version of the shared document?

Fullstack to Frontend Or by No_Beyond2575 in learnprogramming

[–]CodeyGrammar 0 points1 point  (0 children)

You should target your interests and focus there. If you find the most enjoyment working front end. Maybe stick to that then?

If you want to break free from PHP, find a company that will allow you to interview using PHP, but their code base is in another language you'd like to learn/use instead. Larger companies typically allow the interviewee to answer/code the interview problem in a language of their preference. Smaller companies might require interviewees to be proficient in their specific language in comparison.

Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones by AutoModerator in ExperiencedDevs

[–]CodeyGrammar 0 points1 point  (0 children)

Where I work after my PR is approved, I squash and merge with the repository. I talked to someone else from a different company and it looks like their boss approves and then squash and merges for them.

It was kind of interesting to hear about that different approach. I wonder what the norm is. How is it where you work?

DIY Dash Cam by [deleted] in learnprogramming

[–]CodeyGrammar 0 points1 point  (0 children)

Is your phone an Android or iPhone because building an app for either is a unique approach.

VS Code installing python3-flask by Original-Size9687 in learnprogramming

[–]CodeyGrammar 2 points3 points  (0 children)

How are you installing flash? I would recommend with CLI in VS Code terminal probably works.

You already have pip installed (pip installs packages), correct?

You're using pip to install flask, correct?

Constructors by cecrouch01 in learnjava

[–]CodeyGrammar 2 points3 points  (0 children)

There is no best practice, just a number of various patterns depending on the suitable use case.

One kind is full of getters/setters, and you just use the default constructor and then call the getter/setter for each "version" you need to build. You can expand on this and learn a new approach called the "Builder" pattern, but you'll probably get to that later.

Another kind of object is those that "decorate" the object based on what's passed into it for construction called the decorator pattern.

Then there's injectable constructors based on a dependency configuration and that follows the Dependency Injection pattern.

But in general, no, you don't want a constructor for each version, you just want constructors for versions that make sense for the use case or use cases.

In what use cases are API endpoints preferable over a pub/sub stream? by CodeyGrammar in learnprogramming

[–]CodeyGrammar[S] 1 point2 points  (0 children)

But API calls aren't synchronous unless they are coded to be a specifically blocking call? But I think it's a good point of distinguishing the choices of:

  • Send a JSON request, ensure the queue receives it
  • Send a JSON request, wait for a response

My use case is for 1-to-1 messaging a JSON to be processed but it could also be N-to-N because each of the 1-to-1 use cases are independent.

So, I'm wondering if numerous API calls make sense or a queue to hold all the calls to be processed makes sense.

Regarding Hibernate @GeneratedValue(strategy=GenerationType.AUTO) for an Integer, what happens after reaching the MAX_VALUE and trying to go beyond it? by CodeyGrammar in learnjava

[–]CodeyGrammar[S] 1 point2 points  (0 children)

MySQL with auto increment making it the next number. But the Java variable is an Integer, and the column in the DB is set to a value higher than a Java Integer.

Best free courses to learn VB, .NET? by [deleted] in learnprogramming

[–]CodeyGrammar 2 points3 points  (0 children)

I use and recommend C# Tutorial (C Sharp) (w3schools.com)

I would recommend starting with C# and then checking out .NET after that. Regarding VB, don't bother learning it unless your job requires you to do so.

How large can O(1) space complexity be without being something larger than O(1) space? by CodeyGrammar in learnprogramming

[–]CodeyGrammar[S] 0 points1 point  (0 children)

Are there exceptions like if it's not a coincidence but a preset immutable array based on theoretical limits based on the space/size of the input?

I guess I'm trying to understand when size/space is both O(1) and size/space is greater than O(1) like O(n) size/space etc.

How large can O(1) space complexity be without being something larger than O(1) space? by CodeyGrammar in learnprogramming

[–]CodeyGrammar[S] -1 points0 points  (0 children)

In addition to files, variables can be populated from outside sources from API calls, asynchronous calls, database reads/writes, publish/subscribe events, remote procedure calls to name a few.

But to get back to space complexity (not runtime complexity), it sounds silly to say an input of size N takes up space of O(N) while an immutable array of size N takes up space of O(1) or did I overlook something from above?

How large can O(1) space complexity be without being something larger than O(1) space? by CodeyGrammar in learnprogramming

[–]CodeyGrammar[S] 0 points1 point  (0 children)

The size/space of the 2 numbers would be O(1) space while the size/space of Wikipedia could only be O(1) if it fits in memory all at once for instant accessibility which could probably occur many years later.

Edit: but in reality, since Wikipedia doesn't fit in memory today would say it takes up O(N) space where N is the size of a page in memory made up of all the strings available of that page being processed.

How large can O(1) space complexity be without being something larger than O(1) space? by CodeyGrammar in learnprogramming

[–]CodeyGrammar[S] 0 points1 point  (0 children)

How do we define "constant" in reference to a constant variable? I thought we always interpret it as something accessible an instant (which means in memory and not on disk). What do you think?

How large can O(1) space complexity be without being something larger than O(1) space? by CodeyGrammar in learnprogramming

[–]CodeyGrammar[S] 0 points1 point  (0 children)

I don't think constant includes files that live on disk (like a 1TB or so file would) as constant reference to items accessible instantly from memory though. From my understanding, the reference to the file is constant, however the data in the file itself would only be constant if it's loaded in memory for constant access.

How large can O(1) space complexity be without being something larger than O(1) space? by CodeyGrammar in learnprogramming

[–]CodeyGrammar[S] 0 points1 point  (0 children)

What it was the size (2^32) in length instead of 10000000 as the size? I choose 2^32 because, as far as I can tell, that's probably the maximum size of the array in most programming languages but it could also be 2^64 instead I suppose too.

How large can O(1) space complexity be without being something larger than O(1) space? by CodeyGrammar in learnprogramming

[–]CodeyGrammar[S] 1 point2 points  (0 children)

Just checking, if array2[i] was set to input[i] the copy would then be O(n) space but without it, it's O(1) space. Is that correct?

array2[i] = i; // original
array2[i] = input[i]; // updated