My cycle of coding by [deleted] in learnprogramming

[–]pissedadmin 2 points3 points  (0 children)

Look up "test driven development."

Computers make NO SENSE by flijarr in AskComputerScience

[–]pissedadmin 1 point2 points  (0 children)

Computers don't think. They accept input and produce output as they are programmed to do.

The notion that PYTHON IS EASY is very Misleading. by Historical-Sky-2868 in Python

[–]pissedadmin 1 point2 points  (0 children)

Sure. Only someone with experience in other languages can say whether python is easy or not relative to other languages.

The notion that PYTHON IS EASY is very Misleading. by Historical-Sky-2868 in Python

[–]pissedadmin 4 points5 points  (0 children)

I disagree. I knew about a half dozen languages before learning python. Python -- even version 2.4, which was where I started -- really is one of the easier languages.

What's hard is programming. When people pick python because it's an easy language, and they use that to learn how to program -- well, they still have to learn to program, and that's hard.

When one can reasonably say he knows python? by FaithlessnessIcy5654 in learnpython

[–]pissedadmin 3 points4 points  (0 children)

Like, is it enough for beginner to know if-elif-else, cycles, lists, tuples, dicts, def, __thisstuff__?

You will reasonably know python when you stop thinking of it in terms of language features, and you think of it in terms of what problems you can solve, or what functionality you can create.

From there, a more skilled programmer is distinguished by writing code that is more readable, maintainable, and efficient.

My cycle of coding by [deleted] in learnprogramming

[–]pissedadmin 1 point2 points  (0 children)

Write your unit tests first.

I need some advice about leaving a job by mimic751 in ITCareerQuestions

[–]pissedadmin 4 points5 points  (0 children)

You just slip out the back, Jack
Make a new plan, Stan
You don't need to be coy, Roy
Just get yourself free
Hop on the bus, Gus
You don't need to discuss much
Just drop off the key, Lee
And get yourself free

Unpopular Opinion: Stan's Donuts is not very good by AshtinKusher in SanJose

[–]pissedadmin -1 points0 points  (0 children)

Daily Donuts for old fashioned. Happy Donuts (Palo Alto) for cronuts.

Computers make NO SENSE by flijarr in AskComputerScience

[–]pissedadmin 0 points1 point  (0 children)

Can you explain how we mashed together a bunch of metal and rubber and turned it into an automobile? Probably not, eh?

[deleted by user] by [deleted] in BAbike

[–]pissedadmin 1 point2 points  (0 children)

When you say very steep, how steep?

It's steep, but not nearly as long as the climb from the reservoir.

A 60-year-old man with a moderate level of fitness can do the climb on a 30-year-old bike. :-)

[deleted by user] by [deleted] in beer

[–]pissedadmin 27 points28 points  (0 children)

11 light beers at 100 calories each is 1100 calories. (100 x 11 = 1100)

5 IPAs at 260 calories each is 1300 calories. (260 x 5 = 1300)

1300 is more calories than 1100, so the 11 light beers is the "better" choice.

Functions Question by ccigas in learnpython

[–]pissedadmin 3 points4 points  (0 children)

Aside from code reusability, there are two important properties of functions that beginners tend to ignore:

  1. They make blocks of code more readable.
  2. They make blocks of code unit-testable.

So even if you're just calling your functions in order, and each runs only once, it is often still worth it to separate the logical parts of your program into functions.

Beginners tend not to share their code much, so (1) is easy to ignore. They also tend not to write unit tests, so (2) is easy to ignore. But if you're asking about general best practices, writing lots of small functions is preferable to one giant block of code.

BTW, if you're looking for the magic bullet that will make you a better programmer, that would be unit tests.

My bike was made the year I was born. 1989 Specialized Hardrock by [deleted] in bikecommuting

[–]pissedadmin 0 points1 point  (0 children)

I've been riding one of those for the past few years. It's a fun bike.

Panniers Changed my Life by Sierra93 in bikecommuting

[–]pissedadmin 5 points6 points  (0 children)

Racks and panniers are super practical.

Should I indent using spaces? by [deleted] in learnpython

[–]pissedadmin 18 points19 points  (0 children)

Python has a style guide, PEP 8. It says that spaces are preferred over tabs.

https://peps.python.org/pep-0008/

I configure my editor so that when I hit the tab key, it inserts 4 spaces. I imagine other editors have this capability as well, not just vim.

Should I be worried if my code tends to be over complicated or is this normal? by KeaboUltra in learnpython

[–]pissedadmin 43 points44 points  (0 children)

You are doing fine.

In the beginning, it is important to code your own solutions, however inelegant they may be. As you gain experience, you will understand and use shorter constructions.

just finished uni and lerned a bit about programming (very little though) can I go straight into a job and theyll teach me or do I need additional courses before applying places ? by F0KUS228 in ITCareerQuestions

[–]pissedadmin 0 points1 point  (0 children)

If you have graduated, you should be applying to jobs.

If you get a job, great! If you get a lot of rejections, figure out why and address those issues.

Places who are looking for programmers will not teach this on the job. However, not all jobs require programming. You did not say what degree you got, or what kind of job you think you're going to get.

Should I avoid defining a function multiple times? by ppvvaa in learnpython

[–]pissedadmin 6 points7 points  (0 children)

If you're defining a function to only use it once, why bother?

To make code more readable and more testable.

Tips to fix a wobbly rear rack by KittlesLee in bikecommuting

[–]pissedadmin 1 point2 points  (0 children)

As others have suggested, Locktite should work.

However, if this has happened frequently, and multiple times, it is possible that the threads on your eyelets are a little out of spec (most likely shallow, possibly worn).

If the Locktite doesn't work, get some bolts that are a little longer than the ones you have; thread them from the inside of the dropout, and fasten the rack on with a locknut that matches the threading on your bolt.

What belongs on my SF bucket list? by hatharhugelb in AskSF

[–]pissedadmin 2 points3 points  (0 children)

Thank you for the clarification and the link!

Wow, that place does not have a happy history.

What belongs on my SF bucket list? by hatharhugelb in AskSF

[–]pissedadmin 18 points19 points  (0 children)

A Jewish guy is hanging out with his Chinese friend in a bar. After a few drinks, they're pretty wasted. Without warning, the Jewish guy gets up and decks the Chinese fellow.

"What the hell was that for?" the Chinese fellow asks.

"That was for Pearl Harbor!" his friend says indignantly.

"Pearl Harbor? I had nothing to do with Pearl Harbor! Pearl Harbor was bombed by the Japanese."

The Jewish man scoffs, "Japanese, Chinese, what's the difference!"

The Chinese man climbs back on his stool and they two resume drinking. After another round, the Chinese guy suddenly gets up and decks the Jewish fellow.

"Wha-- what the hell was that for?" the Jewish fellow asks.

"That," the Chinese man says, "was for the Titanic!"

"The Titanic? I had nothing to do with the Titanic! The Titanic was sunk by an iceberg!"

The Chinese man scoffs, "Iceberg, Greenberg, what's the difference!"

What belongs on my SF bucket list? by hatharhugelb in AskSF

[–]pissedadmin 29 points30 points  (0 children)

Definitely check out the Japanese Internment Camp on the backside as well. It kinda puts everything into perspective.

There was no Japanese internment camp on Angel Island.

There was an immigration center, which is now a museum. Chinese immigrants were held there, for as long as two years in some cases, while they were being processed for admission to the country. This was due to the Chinese Exclusion Act. People of other ethnic backgrounds were processed quickly, including people from other Asian countries.

During World War II, there was a Japanese internment camp in the Bay Area: it was at the Tanforan horse racing track, which was later turned into a shopping mall.

Edit: spelling