7 ms·
"The C compiler made me feel adequate. Unlike Ada, I regularly got my programs to compile. And so, I made my choice and went with C." I think this dynamic play
by nostrademons 10y ago
"The C compiler made me feel adequate. Unlike Ada, I regularly got my programs to compile. And so, I made my choice and went with C."
I think this dynamic plays out in a lot of technology evaluation decisions. It's probably why techs like Javascript, MongoDB, Ruby on Rails, Java, PHP, MySQL, Wordpress, etc. have gotten widespread adoption despite numerous technical flaws. They have a very low barrier to getting something useful up on screen, and feed peoples' need for instant gratification. When you feel good about yourself while using the language, you feel good about the language.
The interesting thing about the software industry is that network effects are often so strong that it's rational for a disciplined, expert developer to use one of these technologies rather than something more niche that plays to their expertise. You may hate Java, but if you need to use Hadoop/Storm/SparkML/OpenNLP and the myriad of well-tested libraries, it may be a lot better choice than building your own distributed big-data stack.
I guess this is the idea behind "Worse is Better" [1]. It makes me wonder if "better" will ever be "better" (perhaps after the pace of adoption in the software industry slows down, and we start spending time getting known product architectures right rather than finding the next big unknown product architecture), or whether by that time the entrenched base written on top of ad-hoc technologies will be too big to change.
[1] https://www.dreamsongs.com/WorseIsBetter.html https://www.dreamsongs.com/WorseIsBetter.html
- jakub_h 10y ago> It's probably why techs like Javascript, MongoDB, Ruby on Rails, Java, PHP, MySQL, Wordpress, etc. have gotten widespread adoption despite numerous technical flaws. They have a very low barrier to getting something useful up on screen, and feed peoples' need for instant gratification. It might not be just about that. Sometimes you don't know what you're doing, and you have to find out first. What use is it if you painstakingly design and craft a perfectly engineered program, only to find out that you actually needed something else? Being able to experiment is precious. Being forced to handle everything before the thing even compiles is not all that useful at times. There's a reason why interactive environments like Lisp and Smalltalk don't force you to define all functions that could plausibly get called (and when they do get called, you can even add them on the fly and continue).
- brandonbloom 10y agoBig +1 to this. The takeaway for me is to develop languages and tools that scale with the domain-expertise curve. That is, as you learn more about both the problem and solution, you can evolve your implementation without having to start over or get many things right from the start. The goal should be to both tighten the feedback loop and provide a smooth path from tinkering towards production grade.
- pka 10y agoStatic languages, in particular Haskell, PureScript, etc, are unparalleled when it comes to fast prototyping or design space exploration. The compiler can show you whether your idea even makes sense before writing big chunks of business code. How? By building the structure/hard stuff first and letting the compiler verify it while leaving out the uninteresting parts. A very simple example. Let's say you have some data model with people, addresses, whatever. You want to see what you need to do to get a list of addresses for some group of people. You start by defining the structure of your data model (this can depend on DB schema, business requirements, whatever): data Person = Person { name :: String, city :: String } data Address = Address { city :: String, zipcode :: String, street :: String } Now, go straight to the hard part. No need to fuck around with DB connections, mock data, whatever: getAddresses :: [Person] -> [Address] getAddresses = undefined Leave out the implementation for now. So probably we are gonna need a way to get an Address for a Person. Ok: addressForPerson :: Person -> Address addressForPerson = undefined Again, leave out the implementation. Now go back to `getAddresses` and see if we can implement it now: getAddresses = map addressForPerson Cool, the compiler doesn't complain. So far we've verified that if we have a function like `addressForPerson` we can safely assume that our design is going to work. Now we can go back to `addressForPerson` and implement that. But turns out, we only have a city stored in Person, so the best we can do is get back a list of potential addresses for each person. So we need to adjust that type signature: addressForPerson :: Person -> [Address] addressForPerson = undefined Leave out implementation, it's trivial so no need to spend time on it now. But now the compiler complains that `getAddresses` doesn't make sense anymore! We are saying that, having a list of people, we can get a list of addresses, but that's not true anymore. We found out that we can only get a list of potential addresses, so we have to adjust the type signature. getAddresses :: [Person] -> [[Address]] Now every use of `getAddresses` will have to be adjusted to the new requirements. Etc etc. Granted, this is a very simple example, but I hope it illustrates how static languages facilitate extremely fast prototyping. Sure, a Lisp REPL is very very nice, but in my personal experience it's no match for a type system. We didn't even have to mock data to start experimenting! (And yes, Haskell, OCaml, PureScript, Elm etc all have a REPL too).
- agumonkey 10y agoI spent the last few years in scheme, caml, haskell, abstract algebra .. one day I remembered that I used to spend hours toying with raw PHP4 just saw I could see "live HTML", it was so exciting.[1] There was nothing of intellectucal value in it, it was just a superb toy. No amount of pedagogy can make haskell shine this way for a newcomer. [1] I somehow forgot that I enjoyed it a lot and loved that thing that I'd avoid like plague a few years later (I don't care about it now, for or against)
- questerzen 10y ago"The best camera is the one you have with you" is a good adage. For prototyping a language needs to feel effortless so you can deal with the essential complexity of the problem and not hesitate to jump in and experiment. For implementation, it's whatever tool best fits the job. C is a good compromise, but it requires real discipline. The CPython and Linux code bases are great examples of how C can be wielded well in practice. But of course C also famously offers unlimited opportunities to make a complete hash of things. I certainly wouldn't recommend it to anyone as their first and only language. An alternative approach is to be bilingual. For my current project the final code is in C++98 - sometimes there's no good alternative. But I do most of my experimentation, tooling and prototyping in Python. Python's excellent C/C++ interoperability is a huge benefit in this. I definitely agree with the article that you shouldn't avoid hard things that improve you. But in choosing between ADA and C, the right answer is both and neither.