Preferences

tmh88j
Joined 829 karma

  1. > Like you said, the fundamental idea behind the book was that consciously naming, cataloging, and studying design patterns would improve communication among programmers.

    > The younger programmers I work with who had no exposure to the GoF book.....and they communicate amongst themselves just as efficiently as my generation

    > The generation that learned to program after design patterns had faded as an idea learned just as quickly and communicates just as well as the generation that studied them assiduously as junior programmers like I did.

    I've never read GOF so I don't know if they emphasize communication, but I have read and studied many other programming pattern books and communication is low on the list of reasons to learn them in my opinion. Their only purpose for me is to organize code in a way that has been proven to "scale" along with a codebase so that you don't end up with a plate of spaghetti.

  2. Yep, that's why I said "behaves like".
  3. > There's no type casting in Python. int(), float() and bool() just create objects of their respective types, passing the arguments to the initializer

    int() and float() behave like type casting, bool() does not. It's a truthiness check that would be more aptly named istruthy(). In python non-empty strings are truthy, so providing any string except for "" to bool() will return True, including "False".

  4. > Right, the bug is in the inconsistent naming.

    The comment I responded to didn't seem to realize that because they asked why it behaves the way it does, so I explained.

  5. > If casting from a string to a type works with ints and floats, why not with bools? What possible justification is there?

    > I'd honestly much prefer bool() threw an exception on receiving a string, rather than act the way it does now.

    They serve fundamentally different purposes. bool() is a truthiness check and not a type cast like int() and float(). It seems like a lot of people take issue with the name, because it was called something like istruthy() the discussion about it wouldn't be happening.

  6. > How does this work, though? Every company I've worked for has an HR system, and resumes flow through it, and there's a set process. If I have worked with a candidate in the past and highly recommend them, all I can do is submit their resume into the great void and check a box "Recommend

    I haven't worked for any massive companies with thousands of employees where there might be a lot of bureaucracy, but the few I've worked for ranged from ~100-700 and it was pretty easy to get interviews for referrals. One of my employers encouraged referrals and offered bonuses if it led to a hire.

  7. > You wouldn’t necessarily want a mechanic or engineer to drive a race car, for example.

    GM does. Their engineers have set multiple track records[1] and vehicle-specific lap records[2].

    [1] https://gmauthority.com/blog/2025/02/c8-corvette-zr1-sets-fi...

    [2] https://www.roadandtrack.com/new-cars/a10206481/the-chevrole...

  8. I'm not exactly sure what you're suggesting, but blaming sloppy codebases you've seen is an unfair, cheap shot at the language instead of calling out bad developers, which applies to every language. PHP is inherently less complex than languages like JS and python for the backend and results in fewer dependencies because it comes with more features specific to web development out of the box. Quite literally no features required to build even a very basic dynamic website come with JS out of the box: sessions, password hashing, database connectors, input sanitizing, cookies, html templating, etc... It all needs to be either written by you or installed as a dependency. They're all standard features in PHP.
  9. You seem to be emphasizing syntax rather than features of the languages and the stack itself. PHP was designed from the ground up for the backend side of web. Python, JS and Java were not. Many fundamental web development features are built into PHP like sessions, cookies, HTTP request variables, while a language interface server like Gunicorn or runtime like node is required to generate much of that from the incoming request and forward it to your application. Once it gets to your application either you or a library then needs to track those cookies, sessions, etc.. That's all built into PHP. So instead of a call sequence for a python/node app being request -> nginx -> Gunicorn -> python app, with PHP it's just request -> nginx/apache -> php app. There are plenty of other web-specific features that are dead simple in PHP like header redirects and HTML templating, whereas with python/node/java they have to be implemented by you, your framework or a language interface server.
  10. Thanks for sharing. This looks like another fun project to work through over a weekend.
  11. > So where are they, all these quiet, beautifully aurally tuned cars (emphasis on quiet)?

    You won't notice them if you're not interested in cars, but there are tons of them and Lexus/Toyota are responsible for quite a few. The RC-F, IS500 and LC500 sound amazing, as did the GS-F and IS-F. Toyota also made some iconic engines such as the 2JZ-GTE in the MKIV Supra and the 2GR engine that Lotus used in the Evora.

  12. > And, as anyone who ever had to drive a car with a broken exhaust muffler can say, it's also nothing special...

    Loud isn't the goal, the tone is. The Lexus LFA is a perfect example of this[1]. It's not extremely loud for a car of that caliber, but it's lauded as one of the best sounding cars ever made. Poorly designed exhaust (or no exhaust in the case of your broken muffler) on an otherwise great sounding engine almost always ruins the tone and makes it unbearable to listen to. Bad exhaust on a bad sounding engine is just miserable.

    [1] https://www.hotcars.com/heres-why-the-lexus-lfas-screaming-v...

  13. These are 2 separate issues you're discussing.

    > remember the time when GM said it’s not going to include CarPlay in its vehicles? And how most of hn was in revolt?

    Most OEM's made terrible infotainment software that is outdated, lacking features and often extremely sluggish and clunky to use. CarPlay and Android Auto are able to bring modern features OEM's can't seem to figure out, like Google Maps integration instead of some terrible maps implementation that is outdated, as in not having addresses added in the last few years, not just "old" and cumbersome to use. I can just open up google maps on my phone, type an address and directions appear on my screen. Same with music streaming apps like Spotify.

    > here comes News that says we should get rid of touchscreens, why is hn supporting this?

    Not eliminate touchscreens entirely, but rather stop putting every single control they possibly can into them making vehicles dangerous to operate. Putting climate, radio, lighting, etc... into a touch screen, especially when buried in sub-menus, is just lazy cost cutting. The other big complaint are touch capacitive "buttons" and sliders. They're distracting and difficult to use, especially on anything but perfectly smooth roads. For example, the Cayenne's interior is basically just a wall of touch capacitive "buttons"[1] that you can't easily reach down to press with your eyes on the road, you have to look down at it. The other issue is feedback from it. Constant beeping from input on menus, like Toyota, just becomes obnoxious. Buttons provide instant mechanical feedback that does't lave you guessing if you pressed on the right spot. Here's a clip discussing some complaints about VW doing all of this to the Golf [2] and how frustrating it is to use.

    [1] https://cdn.carbuzz.com/gallery-images/2022-porsche-cayenne-...

    [2] https://www.youtube.com/watch?v=GU92h1hez_8&t=159s

This user hasn’t submitted anything.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal