"First a punch is just a punch, Then a punch is not only a punch, And finally a punch is just a punch" (heard from Bruce Lee) Basically it means that in the beginning we punch like we can.. then a martial arts student learns the proper and different ways to punch.. so a punch is no longer just a punch... Is a lot of instructions.. Then to sheer practice and repetition the right way to punch becomes second nature.. so…
“Coding is basically just ifs and for loops.”
261–270 of 418 posts
Re: “Coding is basically just ifs and for loops.”
#262"First a punch is just a punch, Then a punch is not only a punch, And finally a punch is just a punch" (heard from Bruce Lee) Basically it means that in the beginning we punch like we can.. then a martial arts student learns the proper and different ways to punch.. so a punch is no longer just a punch... Is a lot of instructions.. Then to sheer practice and repetition the right way to punch becomes second nature.. so…
Translation from http://www.livinglifefully.com/zensayings2.htm
Re: “Coding is basically just ifs and for loops.”
#263"First a punch is just a punch, Then a punch is not only a punch, And finally a punch is just a punch" (heard from Bruce Lee) Basically it means that in the beginning we punch like we can.. then a martial arts student learns the proper and different ways to punch.. so a punch is no longer just a punch... Is a lot of instructions.. Then to sheer practice and repetition the right way to punch becomes second nature.. so…
That’s what disappoints me in modern Java. There is practically no ifs. It makes it inaccessible to beginners on the project, and the streams are about twice as slow… just because devs think they are more clever if they pile 7 “.map()” to transform a list. list.stream().filter(Objects::nonNull).map(User::getUsername).filter(Objects::nonNull).filter(name -> name.contains(searchString)).map(name -> “We have found your…
Re: “Coding is basically just ifs and for loops.”
#264Thats why i am seeing DB schemas without indexes lately. End of the day people with this kinda thinking make others to fix the broken code that they left behind. As a senior software engineer i had to spend a lot of time at night fixing code written by junior devs and interns. the code that company and devs (just ifs and loops gang) proud of was a pain in the ass for me so i quit the job entirly and do freelancing th…
Writing code that works is simple. Writing code that doesn't break is not simple.
Re: “Coding is basically just ifs and for loops.”
#265Earlier quoted context omitted.
And that's also why a lot of Architecture Astronaut that looooved Java, didn't see Python coming.
Funny, I took over a modern python service and I was pretty shocked at what I inherited. Long gone are the days of "There's one way to do things". Instead, this thing would give the most "enterprisey" Spring JEE application a run for its money with its endless annotations, dependency injection magic, all sorts of pseudo-types - both the "built-in" Python 3 ones like Set and List, but also the libraries like Pydantic.…
Re: “Coding is basically just ifs and for loops.”
#266Earlier quoted context omitted.
Recently posted this, which wasn’t well received. https://motherfuckingwebsite.com/ Where does this fall?
In going too basic. We can go to simple and elegant without going all the way back to crappy stone tools. http://bettermotherfuckingwebsite.com/ https://evenbettermotherfucking.website/
Re: “Coding is basically just ifs and for loops.”
#267I also like "all web development is basically fancy string concatenation", and as a web dev I feel seen.
Like everything Hotz says it's spiced up of course, but there's a kernel of truth to it.
Re: “Coding is basically just ifs and for loops.”
#268"First a punch is just a punch, Then a punch is not only a punch, And finally a punch is just a punch" (heard from Bruce Lee) Basically it means that in the beginning we punch like we can.. then a martial arts student learns the proper and different ways to punch.. so a punch is no longer just a punch... Is a lot of instructions.. Then to sheer practice and repetition the right way to punch becomes second nature.. so…
Before one studies Zen, mountains are mountains and waters are waters; after a first glimpse into the truth of Zen, mountains are no longer mountains and waters are no longer waters; after enlightenment, mountains are once again mountains and waters once again waters. Translation from http://www.livinglifefully.com/zensayings2.htm
:)
Re: “Coding is basically just ifs and for loops.”
#269Earlier quoted context omitted.
What version of Basic were you using that lacked FOR? Even the shitty one crammed into my Sinclair ZX80 had FOR.
Oh, I can't say that it didn't. But I was only 7, and more amused by things like 10 PRINT "POOP" 20 GOTO 10 than, what, reading a non-existant manual? My parents weren't programmers, so I learned by stumbling in the dark. But, you've got me curious. I recall using BASICA, GWBASIC and QBASIC -- reading over their respective histories, I'd have gotten my start on BASICA on a hand-me-down 286. I'm not finding good docs…
10 print "poop ";:run
FWIW, the very first version of BASIC in 1964 supported FOR (https://en.wikipedia.org/wiki/Dartmouth_BASIC#First_Edition). I never used DOS machines but https://gunkies.org/wiki/Microsoft_BASIC claims that BASICA was based on Microsoft's BASIC, and that definitely had FOR.
Young you must have arrived at the concept of a for loop without knowing there was a keyword in the language designed to support that, which is pretty cool!
Re: “Coding is basically just ifs and for loops.”
#270"First a punch is just a punch, Then a punch is not only a punch, And finally a punch is just a punch" (heard from Bruce Lee) Basically it means that in the beginning we punch like we can.. then a martial arts student learns the proper and different ways to punch.. so a punch is no longer just a punch... Is a lot of instructions.. Then to sheer practice and repetition the right way to punch becomes second nature.. so…
That’s what disappoints me in modern Java. There is practically no ifs. It makes it inaccessible to beginners on the project, and the streams are about twice as slow… just because devs think they are more clever if they pile 7 “.map()” to transform a list. list.stream().filter(Objects::nonNull).map(User::getUsername).filter(Objects::nonNull).filter(name -> name.contains(searchString)).map(name -> “We have found your…
In a list
John
Jonhatan
Joy
searching for "Jo" returns all three of them in the first example, it stops when the first has been found in the second.Start including the tedious bits about adding found items to the list and the waste of intermediate variables and your "clear" code is wrapped around a lot of repetitions, that only add noise.
It just happens that you are more familiar with the second style, but pipelines are better in many other ways, clarity of intentions being one of them.