He showed how to express complicated business logic in Python in a simple and elegant way.
Ask HN: What made you change your mind about a programming language/paradigm?
191–200 of 401 posts
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#192Monorepos. They started making sense when we started refactoring code into npm packages, and one-repo-per-package would have been insane to manage as 30 separate build scripts.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#193Earlier quoted context omitted.
Same, except I realized this after starting my first (and current) job as a C developer. I now get way more annoyed by the in-house build system than the huge C codebase.
I made the decision to do that project in C, in part to be better at it (I did a bunch of small things with it, but nothing serious). Since I had to interact with Redis' C API, the choices were basically C or C++. I hated C++ much more than C having worked with a lot, so C it was. I can't say I didn't miss things like having shared_ptr and, you know, having destructors, but all in all it was a good experience. (side…
Now `unique_ptr` is worth missing. And destructors are good too -- you couldn't have unique_ptr without them. But in it's own way, C has both: its just you just have to remember to call the destructor yourself, every single time.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#194Earlier quoted context omitted.
> Then I found out that -white space is important-. I hear this a lot and I think it's a misunderstood statement. Python does not care if you do not have a space in assignments or arithmetic or between commas or parentheses. What Python does care about is the indentation of the source code. The indentation is what guides the structure - which is already what we are doing with most languages that don't care about inde…
But doesn't the whitespace issue gimp Python's lambda syntax? AFAIK you're limited to one expression or function call, to get around the fact that you can't just inline a completely new function (with its associated control flow structure). And what about one-liners, a la Perl? Stack Overflow answers seem to imply either embedding newlines in your string, or using semi-colons (as a Python newbie... you can use semi-c…
On the other hand, if your function needs a flow structure that's more complicated than a single line, should you really be inlining it?
And I think any such use case that you really want to inline can probably be accomplished with list comprehensions
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#195Microservices. They seemed really cool until I worked on a few large projects using them. Disaster so epic I watched most of engineering Management walk the plank. TLDR: The tooling available is not good enough. The biggest cause lies in inter-service communication. You push transaction boundaries outside the database between services. At the same time, you lose whatever promise your language offers that compilation…
Microservices doesn't necessarily mean you have a ton of services. A single microservice can encompass millions of lines of code. Honestly, its a bad name for the architecture.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#196Using it as my main language: Python (2.7). How the hell did this thing become so popular? I've used it for all sorts of stuff earlier, less complex than the other. Scripts, devops, ETL... But then I got into a company that is using it for some quite serious stuff, a large codebase. Holly smokes this thing does not scale (in terms of development efficiency and quality) well. I swear at least 70% of our bugs is becaus…
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#197ORMs, until i wrote my own.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#198I used to hate C and thought it was primitive, ugly, dangerous, tedious to write in and annoying to read. While writing a big project in it ( https://github.com/RedisLabsModules/RediSearch/ ) , I've discovered the zen of C I guess. Instead of primitive I started seeing it as minimalist; I've found beauty in it; and of course the great power that comes with the great responsibility of managing your own memory. And wor…
What would you pick instead of C?
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#199Testing. Unit testing to me seemed akin to drinking 8 glasses of water every day. A lot of people talk about how important it is for your health, but it really tends to get in the way, and it doesn't seem to really be necessary. Too frequently, code would change and mocks would need to change with it, removing a good chunk of the benefit of having the code under test. Then I started writing integration testing while…
My experience has been very much the opposite - integration tests are often very brittle, and finding the root cause is often almost a fools errand since stack traces are often no good for figuring out what went wrong, at least for web UI. While yes, unit tests do have a maintenance burden, they are often reproducible, less flaky, give you targeted debug information, and run extremely fast. There are heavy costs to i…
E2E UI tests are definitely hard to debug though, in most cases. They still have value, but I’m a fan of the “testing pyramid” here. A small number of E2E UI tests, a decently large number of integration tests that each try to test a single contract between 2 services, and a tonne of unit tests to cover sad paths, detailed behaviour, etc.
Re: Ask HN: What made you change your mind about a programming language/paradigm?
#200Earlier quoted context omitted.
Same reaction but different type of project and language. Immutable data with persistent data structures was a game changer for me. There is place for OO but it does feel like the last 20 years our profession has been suffering from collective insanity.
Try code large a GUI project without OO.