Ask HN: What cool development languages/tools changed your career?
I've been a web developer for the past 10 years and I've mostly used PHP in my projects. I've also had a chance to code in JavaScript, C#, Delphi. I've had the chance to build large website (>500k users/day) and desktop apps used by millions of users per month, but I always used the technologies that felt comfortable to me. I knew Zend Framework very well, so I used that one to build the services.
My "oh wow" moment was when I discovered Phalcon PHP framework (https://phalconphp.com/en/) about a year ago. I've switched all our projects on this framework and saved thousands of $$ because of the performance impact.
The other thing that made my day was when I discovered Django (https://www.djangoproject.com/). I never knew Python, but I decided to give it a try. The performance is amazing (I always thought that it was slower than PHP - I was wrong) and it seems I can build the projects faster that I ever could using PHP (with any framework).
What were your "wow" moments in your career? What was your best decision to improve your work?
314 comments
[ 3.0 ms ] story [ 302 ms ] threadSuddenly CSS became fun again and my time designing websites went down by a guessed factor of 5.
Tachyons is different, it doesn't give you components but single-purpose classes and a font-relative layouting system:
http://tachyons.io/docs/layout/spacing/
It takes a while getting used to the names, but after that it's just awesome that you don't have to think about padding, margin and font-size values anymore. Just slap "pa1" or "pa2" there and everything looks pretty.
From experience, your method is easier to think through, but later on it is more time consuming to modify a layout. pa1 and the like should be treated the same as magic numbers.
But having 7 rem-relative steps, that fit together makes the common use-case way easier: Joe: "I need more padding on this, so I use pa2 instead of pa1".
If you feel the urge to check your code base it's easy to write scripts that count the occurences of "pa1..pa7". It's not so easy if you have to take into account "padding: 1px", "padding: 20%", "padding: 3em" etc.
Another problem I've encountered: functional CSS (such as Tachyons) is only good for minimal layout. I was recently converting a mobile+tablet+desktop PSD design to CSS with very complicated reordering rules (this <div> is full height on the right on desktop, floated bottom of the page on tablet, etc.) and all my elements had 20+ classes attached to them.
So I went back and converted regular 60+ lines of CSS. Still, for some reason, working with Tachyons was for some reason faster and "easier" to reason about.
I think it's a step in the right direction, but we're not there yet.
Also, if you're using something like React, you can share the style strings in variables.
After about a year of using highcharts, for a specific custom chart project, I was given the opportunity to learn and implement it in d3. I built my first line chart by hand which took me little more than a week and then the custom chart project in about two weeks. It was definitely the most exciting project I have worked on so far.
Learning d3.js also made me rethink my 'use javascript as necessary' policy. I also came to appreciate what other charts libraries like highcharts do, but I won't be using those other libraries anytime soon if I can help it.
Django compared to Laravel (which is now probably the most popular PHP framework) is orders of magnitude faster. This is what I meant with Django being faster that PHP (this statement compares a framework with a programming language - not fair)
thanks for giving me some more motivation!
Languages with fundamentally different paradigms will still be a little tricky - Haskell, Scala, Stan, R etc don't bear a lot of resemblance to PHP.
Also, check out their learning paths for C# - it can be a good option to avoid the overwhelm if you are new to the language.
As someone super rusty on it, I found it remarkably easy to get up and running on the platform.
If they can only finish the tooling so that NCrunch can run properly, life will be a bliss.
The examples are in .NET Core (the cross-platform parts are more Mac than Linux focussed) but really it's a general guide on how to make web applications perform well.
I've to open a new paranthesis about Node.js. If you've never worked with Node.js before and you start in 2016 you're kinda f*cked up. The ecosystem is changing a lot and maybe 70% of the resources you can find over internet are already outdated. You start the day happy and with full batteries and you start to use some frameworks etc. The next day you realize that people already abandoned it. Beside all the disadvantages of Node.js, it's also so annoying and make the adoption process so hard. How such a simple language like Javascript could become so complicated?
GO is very cool. Relatively easy language and also very very powerful, it has a high quality community and the resources you can find are very clear. If you are trying to pick between GO and Node.js, go with GO. Your adoption will be much easier.
By the way, looks like you're living in Barcelona as well ;)
> [...]
> How such a simple language like Javascript could become so complicated?
;)
I had the same learning moment a couple of years ago. I used to code mainly in Java so when I had to build a frontend, I tried to avoid Javascript and use some Java framework like GWT, Wicket or even Swing instead. At some point I grew tired of the pitfalls and limitations that I kept running into and decided to bite the bullet and just learn Javascript properly. It was a revelation.
TL;DR; Don't stubbornly stick to one language, choose the proper language for the job.
https://vaadin.com/home
If you're sure you can find more clients, you can just double the rate with the existing ones.
I hear about devs billing $300-500/hr, but that must be some golden enterprise moneys.
At work I use C# - but I hope to keep learning more languages. The main thing I was worried about initially was being stuck with one language my whole career.
Anyone else ever feel that way?
Ideally I'd like to work on something others could make use of, but I've been having a hard time thinking of something interesting to work on.
Now, on that topic, what's much harder than learning multiple languages, is learning multiple language paradigms. If you have a C++ background, learning C#, Java, Swift, JavaScript, whatever is pretty easy.
Learning Haskell, ML, Elm, F#, Clojure, etc...now that will make your mind bend and spin for a bit. Those aren't nearly as common in a work environment, but you can gain a lot from learning at least one.
This is kind of similar to how if you're an english speaker, learning another european language isn't nearly as interesting as learning a CJK.
Being stagnant as a developer is something I never want to happen.
I would suggest picking a language you have an interest in and a project you have an interest in and having a go at it. Then repeat the process with a new language and a new project. At the end, you will have some working software and an expanded perspective.
I saw every config file differently, trying to see how the lines between config and code blurred. Method abstractions and bottom up design became much easier. I appreciated all those prefix-evaluation assignments in college. I found a new respect for languages with good REPL's. And finally, it opened my eyes to computing history, where I discovered newer is not always better. The elders of old really got many things right.
I feel sad when I hit special forms in languages, and can't just a macro to change the language to suit the way I want to do it.
It made every other language I used feel overly verbose. Sure, Scheme is a bit verbose, but with two or three macros, and a handful of recursive functions, I write about 1/3 of the code I would in another language.
Having readers, and parsers exposed makes it so easy to fit the language to the task, rather than bludgeoning the language with a hammer, or rephrasing the question till it almost fits.
Random example:
You need to allow a user to run half a dozen functions, with a syntax.
Normal approach, (after you've argued you shouldn't do this), is to write a parser and evaluator, and hope you didn't expose a security hole like SQL injection by accident.
Scheme approach: Generate an empty environment, attach only the necessary functions. Parse and handball to the environment.
Eval doesn't have to be evil, especially when the language provides the tools you need to sandbox users.
I tend to avoid continuations in production code, because how it reacts very much depends on what you're accomplishing. Most exception handling frameworks use continuations, which you can accidentally turn into infinite loops if you don't abort the loop properly.
You could do this with Javascript 'eval' too and I still wouldn't recommend it. Usually when this sort of requirement comes up the answer is actually visual programming, where the user just has to join blocks up and get's some sort of immediate real time feedback [1]. It's the only time VP is a good idea as the problem is in an extremely extremely constrained environment. Putting Lisp in it's place is really just an all round awful solution. Look at how the AutoCAD Lisp experience turned out [2].
[1] http://acegikmo.com/shaderforge/
[2] https://www.youtube.com/watch?v=LM1RMgIdgR8
Visual Programming might possibly be useful for end users, but in most areas, there are better approaches.
Serving limited environments to users is useful in at least these situations:
* nREPL * Database APIs (ala firebase) * Mathematical APIs (ala Mathematica)
Some of these I've needed in production, such as more precise calculations for statistics. (FloNum integrations into pre-existing applications).
My main point was, LISP is unconstrained, but still gives safety to the programmer.
A simple example of a first class environment:
The only function exposed is called add. There isn't a way to break that. It makes embedding Scheme into applications such as GIMP or games much easier.(Just a side note, antimony [0] seems to be gaining popularity in its niche)
[0] https://github.com/mkeeter/antimony
The ZODB (Zope Object Database) is also still going strong: http://www.zodb.org
ZODB is also the underlying technology of the recently launched ZeroDB, an e2e encrypted NoSQL DB: https://opensource.zerodb.com/
However, for the use cases where Zope shone (complex security requirements, extensible content types nested arbitrarily, etc.), there are a number of Zope-inspired frameworks that are reasonable choices today, such as:
http://www.pylonsproject.org/
http://www.substanced.net/
http://morepath.readthedocs.io/en/latest/
really? or was that supposed to be the other way around?
Personally, I can't help thinking of scala as a hipster beard on the face of java.
Compared to Java, the inherent safety level of the type system is very similar, but since it's much lighter weight you can do a lot more of it; "newtypes" are much more concise, and for/yield makes it possible to treat errors as values in a lightweight way rather than using the second parallel type system that is Java checked exceptions.
Without getting into specifics all too much, an example of things that can make code much shorter, yet readable, is piping data through a series of functions, which is something that Python doesn't allow without repetition, as far as I know. There are lots and lots of things you could point to. I don't think the point is to change Python, but I do feel that people who are too snowed in could accept that the time wherein Python was the most concise, yet readable language has passed quite a while ago, so it might be less of an argument for Python than they'd think.
The same will end up happening with the "ecosystem argument" as well, by the way. It will be touted as Python's greatest strength 10 years into the future when it no longer holds true, but since it's something that's been repeated for tens of years it'll still be repeated, based solely on history.
Clojure forced me to think in a radical different way than I was used to. I started with massive functions that easily became unreadable, and slowly adapted purity and wrote side-effect free code. The paradigm shift affected me so much that even in other languages, I started writing pure code and use function composition more and more often. Coming from an imperative background, functional programming was a bit difficult at first to wrap my head around, but now I love it! (Eventually I even ditched JavaScript for ClojureScript).
Go recently because it was my first truly compiled, statically typed language after almost 7 years of working (I know, right?). My entire career consisted of Python, PHP, JS, Ruby - you get the idea. Go changed that. On top of that, it is a very biased language that forces it's coding standards on you. Not all are good but you learn a lot about the design decisions behind them and why things work in the way they do.
Plus after working with it for a while, even other compiled, statically typed languages like C++ became a good chunk easier.
And as a extra, very recently: Elixir. Loving functional language, Elixir taught me erlangs genservers and process manage and oh boy! I don't understand why that's not the default tool we use for webservers all the time. It just seems like a natural fit vs other languages. Thanks to supervision trees, it is very easy to write fault tolerant, highly concurrent applications that span multiple servers, without the need for extra tools.
For example: You can spin subprocesses up at any point, communicate with them, kill them, let them crash without fearing that anything else in your application is affected. When previously you needed a queue server, a cache server, background workers, service crash recovery, long running requests processing and more to build a concurrent system, Elixir makes it very easy to implement these things extremely easily as subprocessed without the need to leave your application and grab tool X (upstart/cron/rabbitmq). Worried that something will crash? Just let it crash and the supervisor restarts it. Worried that the supervisor crashes? Then the supervisor of the supervisor restarts the supervisor.
Your background worker process is on server 2 and you want to dispatch something from server 1 from the same mesh? Just use it's PID and let BEAM handle the rest. Same for Queues, Stores, Caches or anything really.
I am highly convinced that learning Elixir is something every web engineer should learn.
Your username intrigues me....what are you working on?
For frontend work, clojurescript. So Elixir+CLJS for almost all web-based apps (or, you know, react native).
Go as an addition to a BEAM app won't add anything as it mostly does nothing much better than the BEAM and what it does better will be better handled by other languages. Some people would attempt to make a case for it being able to spawn threads, etc., but its scheduling makes in inherently as incompatible with the BEAM as any other language, so it's not a reasonable point to make.
Additionally, Rust is a very well-engineered language, but it has few ground-breaking attributes. The borrow checker has never appeared in a non-esoteric language before, I guess. Most of the other goodies could have blown people's minds long before in another language.
It hasn't really changed my perspective on programming. I haven't been doing it long enough to have it transform my career. As an answer to the OP, it's not a particularly good one for me.
I work on many projects with many different modules, languages, databases... What this enables me is to be one single command and a seconds away from completely switching context while still maintaining basically identical environment. It encourages experimentation because you're language/project agnostic and it reduces friction to getting started which is a great boon for productivity.
But more importantly, when I read Javascript: The Good Parts by Douglas Crockford. It was my introduction (though I didn't realize it) to functional programming, closures, and thinking much more about scope. I went from thinking of JS as a pile of junk to a language with remarkable flexibility.
That doesn't mean I do everything in JS, but I find I like the language a lot more than most of my peers.
https://github.com/getify/You-Dont-Know-JS/tree/master/scope...