Learn Programming

1769 readers
1 users here now

Posting Etiquette

  1. Ask the main part of your question in the title. This should be concise but informative.

  2. Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.

  3. Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.

  4. Ask about the problem you're trying to solve. Don't focus too much on debugging your exact solution, as you may be going down the wrong path. Include as much information as you can about what you ultimately are trying to achieve. See more on this here: https://xyproblem.info/

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
1
0
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
 

This community is aimed at two specific topics:

  • Support general programming questions, of any language, mainly for people beginning their journey in programming.
  • Give some advice on programming education or career.

What this community doesn't intend to do:

  • Give specific answers to very specific, non-beginners, problems of a particular language. You probably can go to a community of that language to get help with that.
  • Solve your programming assignments. You can ask for a specific issue, but it's essential that you learn to think and solve them, or you'll never progress.

As suggested by Captain Janeway, here are some rules specific to the posts:

  • Paste your code. Unless there's not any other way, please don't provide screenshots of the code, it's harder to review.
  • If possible, try to provide a runnable example of the code in question
  • Explain as much as you can: what you’ve tried, what the error is, what you think the problem is
  • As usual, be kind

The probability of getting an answer will increase dramatically if you follow these points.

This post will be updated periodically, with any new inputs considered necessary.-----

2
 
 

I’m versed enough in SQL and RDBMS that I can put things in the third normal form with relative ease. But the meta seems to be NoSQL. Backends often don’t even provide a SQL interface.

So, as far as I know, NoSQL is essentially a collection of files, usually JSON, paired with some querying capacity.

  1. What problem is it trying to solve?
  2. What advantages over traditional RDBMS?
  3. Where are its weaknesses?
  4. Can I make queries with complex WHERE clauses?
3
 
 

Learning by doing is hard to beat when it comes to building software.

I am starting a home lab to have a safe environment to try things out. Any ideas on what I could run that is completely useless but fun to set up?

@learn_programming
@homelabs

4
9
dynamic tables? (moist.catsweat.com)
submitted 1 month ago by [email protected] to c/[email protected]
 
 

im trying to understand 'dynamic tables' [snowflake] and they kiiinda just sound like materialized views + automation on cache results?

5
 
 

How can I define lines so when I click on the screen, my program knows whether I clicked on A B or C?

6
 
 

Besides some of the very, very obvious (don't copy/paste 100 lines of code, make it a function! Write comments for your future self who has forgotten this codebase 3 years from now!), I'm not sure how to write clean, efficient code that follows good practices.

In other words, I'm always privating my repos because I'm not sure if I'm doing some horrible beginner inefficiency/bad practice where I should be embarrassed for having written it, let alone for letting other people see it. Aside from https://refactoring.guru/, where should I be learning and what should I be learning?

7
8
 
 

It's about asking, "how does this algorithm behave when the number of elements is significantly large compared to when the number of elements is orders of magnitude larger?"

Big O notation is useless for smaller sets of data. Sometimes it's worse than useless, it's misguiding. This is because Big O is only an estimate of asymptotic behavior. An algorithm that is O(n^2) can be faster than one that's O(n log n) for smaller sets of data (which contradicts the table below) if the O(n log n) algorithm has significant computational overhead and doesn't start behaving as estimated by its Big O classification until after that overhead is consumed.

#computerscience

Image Alt Text:

"A graph of Big O notation time complexity functions with Number of Elements on the x-axis and Operations(Time) on the y-axis.

Lines on the graph represent Big O functions which are are overplayed onto color coded regions where colors represent quality from Excellent to Horrible

Functions on the graph:
O(1): constant - Excellent/Best - Green
O(log n): logarithmic - Good/Excellent - Green
O(n): linear time - Fair - Yellow
O(n * log n): log linear - Bad - Orange
O(n^2): quadratic - Horrible - Red
O(n^3): cubic - Horrible (Not shown)
O(2^n): exponential - Horrible - Red
O(n!): factorial - Horrible/Worst - Red"

Source

9
 
 

My bachelor's in software engineering starts in quite a few months

I am thinking of downloading Linux and learning the Linux terminal using the Linux bible.

then learning video, photo, and vector editing.

After that finishing the rest of the cs50 except the scratch one.

Lastly, becoming extremely good at Python

How does it all sound?

10
 
 

Although I prefer the Pro Git book, it's clear that different resources are helpful to different people. For those looking to get an understanding of Git, I've linked to Git for Beginners: Zero to Hero 🐙

The author of "Git for Beginners: Zero to Hero 🐙" posted the following on Reddit:

Hey there folks!

I've rewritten the git tutorial. I've used over the years whenever newbies at work and friends come to me with complex questions but lack the git basics to actually learn.

After discussing my git shortcuts and aliases elsewhere and over DMs it was suggested to me that I share it here.

I hope it helps even a couple of y'all looking to either refresh, jumpstart or get a good grasp of how common git concepts relate to one another !

It goes without saying, that any and all feedback is welcome and appreciated 👍

TL;DR: re-wrote a git tutorial that has helped friends and colleagues better grasp of git https://jdsalaro.com/blog/git-tutorial/

EDIT:

I've been a bit overwhelmed by the support and willingness to provide feedback, so I've enabled hypothes.is on https://jdsalaro.com/ for /u/NervousQuokka and anyone else wanting chime in. You can now highlight and comment snippets. ⚠️ Please join the feedback@jdsalaro group via this link https://hypothes.is/groups/BrRxenZW/feedback-jdsalaro so any highlights, comments, and notes are visible to me and stay nicely grouped. Using hypothes.is for this is an experiment for me, so let's see how it goes :)

https://old.reddit.com/r/learnprogramming/comments/14i14jv/rewrote_my_zero_to_hero_git_tutorial_and_was_told/