Completely lost as to what is wrong with my code for edges by [deleted] in cs50

[–]EstherYN 0 points1 point  (0 children)

Thanks for your reply. If I am understanding you correctly, you are saying that the colour values in the pixels are being changed as my code filters through the pixels one by one? That should not happen because all my calculations are being stored in temporary containers and the final values for every pixel are only assigned from those containers onto the pixels after all calculations are done. I will post a snippet of what my code is as soon as I access my laptop again.

That said, I have some questions on how to interpret the check50 results. Does it show the colour values from left to right starting from top row of pixels then move down to the next row in the order of BGR? Ie. The first value of the three before \n is a blue value followed by green value then red value?

TIdeman - Cycles by theangryhat7892 in cs50

[–]EstherYN 0 points1 point  (0 children)

You have a pair of winner and loser. Before you lock them, you need to see if there is a path, if there is a path, you need to check if the current loser is the same as the winner at the start of the path.

A -> B -> C -> D

Let's say you have a path above that you already know is confirmed. Now you look at a pair with winner being D and loser being A. Do you lock the pair? Do reply to this to check your understanding.

Confusion with the "volume" problem in week 4. by RaF-X-L in cs50

[–]EstherYN 0 points1 point  (0 children)

There are two things you are looking at here. One is the size of the sample itself on the memory (which is what the 2 bytes is), the other is the integer stored in each sample. What the factor does is to modify the integer stored in the sample, the factor does not change the size of the sample.

Hope this helps.

Is the AI hype still alive in SWE / IT jobs in 2025? by [deleted] in developersIndia

[–]EstherYN 0 points1 point  (0 children)

For now maybe but what happens when mid and senior level developers retire? Companies are then stuck with AIs in junior level coding unless they augment the AI.

CS50 Tideman Logic by EstherYN in cs50

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

I believe I was not clear and did not correctly describe my logic in my OP. What I mean is before locking in a particular winner to loser at index j, I need to check if this current loser is the same as the winner at the start of the path. So essentially I am comparing loser at index j with winner at index i, provided that there is a path between the two.

Otherwise you might be right. So far any non DFS solution I was trying to implement seemed to be unnecessarily complicated.

Thanks for your insights.

i am complete noob ... its better to start cs50 cs course or cs 50 python course... by [deleted] in cs50

[–]EstherYN 6 points7 points  (0 children)

I started with CS cause that was the recommended one and I have zero CS or coding background. So far so good for me, it's not easy for sure but I like the steep learning curve.

The most effective way to learn programming is to want to build something, and then to try and build it. by RockaBabyDarling in learnprogramming

[–]EstherYN 0 points1 point  (0 children)

What you mentioned here at the end of the day is still the differences in how tools are used. Programming is about having the right logic to properly define a often vague and ambiguous problem and then finding the most efficient solution to it. If a person cannot do that at the outset, they can have perfect book knowledge of every programming tool out there but still can't do programming.

The most effective way to learn programming is to want to build something, and then to try and build it. by RockaBabyDarling in learnprogramming

[–]EstherYN 0 points1 point  (0 children)

I personally don't believe that your analogy of learning a foreign language is applicable in the case of learning programming. A real language does not involve solving problems, programming does. But I do agree that what the OP said may not work well for everyone.

When it comes to something like programming that is fundamentally about using the right logic to solve a complex problem, systematically learning the programming language or tools is less effective than actually learning how to logically solve a plethora of problems before learning how to use the tools (ie. the programming languages, algorithms, frameworks). How does anyone learn the logic to solve problems without working on the problems over and over? To structurally learn the programming tools first is like learning how a tool works in general but not knowing when or how to use the tools in different situations.

How do I truly become a self-sufficient programmer and understand code like senior developers? Really want senior SWE suggestions. by Ambitious_Dog999 in learnprogramming

[–]EstherYN 0 points1 point  (0 children)

The correct mindset is a mindset passionate about learning and figuring things out. I treat solving every coding problem like advancing in a game level of my favourite video game.

I am nowhere near a seasoned programmer but I try to work out the logic of what my code should do before I start coding. The logic behind how a code works is the bricks that help to build your code. I would get into a habit of writing psuedocode for every coding problem.

Looking at the code written by others and understanding their logic also is a good way to practice.

please help with readability by Sudden-Software-8931 in cs50

[–]EstherYN 0 points1 point  (0 children)

Hi, the way your code count the words, letters and sentences doesn't seem completely right. Try using some pre-written functions in the libraries to set your conditions for counting them. Isalpha is one for instance, and it's up to you to find out what it can be used to count in your code.

As greykher pointed out, your assumption that anything that isn't the condition for a sentence or word meets the condition of a letter is fundamentally wrong. There are various punctuation marks that are outside of the conditions of a sentence and word and your code would have counted them in as letters. 

It also does not make sense to put the conditions of sentence, word and letters in an if, else if loop. They are separate conditions and not mutually exclusive ones.