APL. Because if you get a job on that basis, you will really have something to put in your memoirs.
And also, you get to have an awesome keyboard!
iām a tab person. I also keep { on the same line. Iāll typically keep my code as vertically compacted as clear readability allows, clear readability being the key factor.
BUTā¦when working on a project with other developers or existing code, if there is an established convention, Iāll match that for consistency and the sake of future developers.
I do have some code cleaning utilities that can convert spaces to tabs, drop or raise { etc. So if I hit code with mixed styles Iāll convert it all to whatever the dominant style for that project is.
ruby is the opposite, you can write very concise code and it is mostly human readable. ruby is a beautiful language, but Iāve only ever been able to use in IRL in RoR projects. Same with python, most of my projects have been Django, I havenāt had the opportunity to use it too widely outside of web applications.
perl can sometimes be human readable, but it is also possible to write code that no one else will likely ever understand fully unless they are programming gods. Iāll often write perl for myself for manipulating data. To me perl is a utility language.
java i dislike, i tend to dislike any programing language that makes me type tons of cruft to get things done, the more concise the better i tend to like developing in it. I choose c# over java if I have the chance, but really Iām meh about both.
C and C++ I love but I seldom take those types of jobs these days.
Also, Regualr Expressions / RegEx while not strictly a language itself is a gift from the computer gods.
No tabs, no comments.
Code is hard to write. It should be hard to read, too.
Actually, when I did write code for a living, the standard was (3?) spaces.
Most of the text editors / IDEs I use have tab set to 5 spaces when you choose to use spaces.
@OtherMichael LOL!
Not really an important reason but with languages like javascript, every space is a character, using spaces makes the resulting file size larger. Also less typing. Its all about the efficiency haha.
also, with tabs, each programmer can set their IDE to use the desired number of spaces for each tab, so those crazy people who think anything other than 2 is the correct number wonāt force me to reformat their code every time I open one of their files.
The answer to āwhat programming language should you learnā for someone who wants to program seriously (either professionally or as a hobby) is, and remains, āas many as possibleā. The answer for someone who doesnāt is, generally, āanyā (although some languages are easier to approach than others and make the first few steps of learning easier ā something that will help some people and put off others).
I get a lot of hate on HN for harping on this topic, but itās something that a lot of beginners donāt realize. Itās not just a matter of choosing the right tool for the job (although thatās part of it); itās a matter of knowing the field. Someone who is really good at front kicks but doesnāt know how to form a fist correctly canāt pass himself off as a karate expert, no matter how good his front kicks are, because in order to reach that stage you need to know a variety of techniques, how they work together, and when each is appropriate; yet so many programmers learn one language and then call themselves ninjas.
And, ultimately, if you cannot determine that the tool you are working with is the wrong tool for the job (which you canāt if you arenāt familiar with enough tools to happen to know a better one), you cannot do the job well with the tool you are forced to use. (To mix metaphors again, you can definitely undo bolts with a vice grip, but when doing so you benefit from knowing how to use a monkey wrench ā in which you benefit from understanding why you should be using the right sized wrench in the first place. If you understand the mechanics of stripping bolt heads, and you have the tactile experience of determining the right sized wrench for a bolt, you can leverage that to use a monkey wrench; in vice grips, you have a less convenient angle so you have to modify the technique you applied to the monkey wrench in order to avoid stripping the bolt-head. Itās exactly the same with programming: if youāre forced to use java to solve a problem that would be better solved in scheme, you simulate the things that make the problem easier to solve in scheme, then you solve the damned problem.)
Luckily, the more languages you know (and the bigger the variety of languages you know) the easier it is to pick up new languages. Iām routinely expected to write code for work in several languages that I would argue I donāt know at all (this week I had to work in both scala and perl; my experience with scala is limited to about three lines of code I wrote for a school project in 2010, and my limited experience with perl is shrouded by decades of incoherent rage against Larry Wall), because Iāve learned how to learn languages and Iāve become skilled at learning enough of a new language to perform a task.
Large projects, if they are well-designed, are often polyglot projects ā people use the appropriate language for each piece (or, more frequently, the wholly inappropriate language they happen to prefer), and then the pieces are bound together through some relatively flexible mechanism. If you know enough languages, you can work on all the parts of such a project (including the ones in languages you donāt know); this makes you valuable: if the entire development team gets hit by a bus you can take over!
Yup, provided you live long enough to write 'em. Do NOT take a job maintaining legacy APL code. If you absolutely must do such work, toss the old code and replace it with your own. APLās reputation as a write-only language is well-deserved. That chap with the brains oozing out his ears and smoke wisping from his empty eye sockets? That could be youā¦
Awesome. I hadnāt seen that.
I have seen the BrainFuck programming language which is turing complete.
This is the classic Hello World in BrainFuck:
For anyone interested here is the Esoteric Programing Language archive.
These would all be good places NOT to start.
Speaking of which anyone want to write a language called Emoji that uses all Emojiās for programming?
When taking over as a primary maintainer for some piece of code, I have been known to experimentally determine the number of spaces the fool who originally wrote it used for indentation and then use sed to convert the entire codebase to tabs ā sometimes producing commits in the millions of lines. Because if you are using spaces for indentation, literally nobody can tell how many spaces you are using (because using spaces for indentation is indistinguishable from having inconsistent indentation, outside of languages like python that autodetect and throw errors on inconsistent indentation), and itās extremely likely that someone later miscalculated the number of spaces you are using and introduced inconsistent indentation, even if you happened to remember.
(It doesnāt help that I work with people who legitimately support both mixing tabs and spaces in indentation and using half-indents in certain places. The person who sits next to me at work prefers two-space tabs and will half-indent line continuations, hard-wrap on 40 characters, and right-justify debug prints. And prefers to use noops for comments over actual comments.)
Thatās it. I am going to retire, grow a huuuge beard, smoke a long pipe, and seriously.only.wear. tweed. And write perl.
All my posts will be on making regexs look nicer and more like sheep, but not more perforamt.
Writing APL isnāt that hard. As you point out, the trouble is reading it. Itās the original write-only language.
#Hasnāt anybody heard of a linter?
Got one in my clothes dryer.
This topic was automatically closed after 5 days. New replies are no longer allowed.