r/dailyprogrammer • • Oct 20 '14
[Weekly #14] High & Low Level
What's your preference towards languages?
Do you like the abstracted nature of Python and Matlab where you can easily create useful programs with a relatively small line count?
Orrrr
Do you prefer the ability to hook into low level devices and disassemble bit by bit the protocols used and create genuinely unique programs which are completely under your control?
Maybe you've found the sacred language that manages both of these without too much pain?
Discuss.
37
Upvotes
19
u/Jumpingrock Oct 21 '14
I prefer the high level just because it keeps things interesting. When you're a programmer, and definitely if you're a CS major, you'll always end up having to use some sort of low level technology at some point to get the most performance out of an application or algorithm. I'll use low level languages when it is needed, but if I'm just making something fun for myself or for a couple of friends, I usually go to some high level languages.
Don't get me wrong, I love seeing how things work and being in high control of my program, but it's nice to break away from that from time to time and write some useful things in a high level language that lets you spit out code like its English!
8
u/I-o-o-I Oct 21 '14 edited Oct 21 '14
Low level programming, specifically c. You get to work directly with the operating system, so you know exactly what your program is doing. This means that to some extent, you also know how all of the other programs on your machine work (whether they are written in c or not).
What I really like is c's ability to interface with other languages. I'll often write programs in c, and make them extensible using lua, or python.
This is just personal preference though. The kind of programs I write for fun are extremely low level. For example I've been trying to learn how to write a VM so I can make something like a profiler. I have written really simple servers. Also for things like cryptography, I think it's better to use a language like c. You don't want too much "magic" because that is something an attacker might exploit.
EDIT: I forgot to mention at the beginning that I was talking about c.
7
u/[deleted] Oct 21 '14
if I can do it in Java, I do it in Java. I'm lazy. Memory management? Pointers? Decrypting ridiculous compiler errors? Makefiles? Pah!
Which is a bad mentality. I'd forgotten everything I ever knew about C/C++ because I do everything in Java and that bit me a bit earlier this semester when I had to start writing serious programs in C++ (that can compile on a version of GNU g++ from 2005...)
6
u/smellmycrotch3 Oct 20 '14
I sort of like almost all of them.
3
u/nyrol Oct 21 '14
I really enjoy programming in assembly languages for older processors. I love trying to get the most out of what little I have. Atari 2600 games in 6502 assembly are wonderful to look at, as well as program. Sure, using C in an embedded world is fun too, as you really have just as much control over things as in assembly, but the tediousness of cycle counting and memory constraints are just fun to beat. Bare metal, man. Bare metal.
3
u/Skyler827 Oct 21 '14
I like using the right tool for the job. I think most stated preferences for one language vs another have more to do with the kinds of problems you need to solve. Most languages have a job where they are or were best suited, but not everyone needs to be able to do all jobs.
It's good to stretch yourself as a learning exercise, but I think the focus should be on the type of job that a programming language was designed for, not the language itself (unless you actually want to learn it to get work done).
3
u/YuEnDee14 Oct 21 '14
In my work, I most often use high-level languages. I really like their ease-of-use, the fact that there are usually plenty of third-party libraries available for them, and that I can focus more on the concepts and the ideas of the solution I'm trying to develop, without getting bogged down in the nitty-gritty of how everything works.
There is definitely something to be said for the feeling of control you have in lower-level languages, but I often find that I enjoy my development time more when I'm not reinventing the wheel, and instead forging ahead with whatever problem I'm trying to solve.
2
u/ReginaldIII Oct 24 '14
My PhD research is centered around high performance, massively parallel computation for physically based rendering. This gives two incredibly important constraints on the languages and frameworks I use.
It can often be useful for me to prototype an algorithm in Matlab on a small subset of the data. It's easy to implement and debug, and any output values can be instantly thrown into a plot.
When I've shown that the idea we're working on is feasible we implement a high performance variant in pure C++ and optimize the heck out of it. For debugging though it can still be useful to plot intermediate values in the computation. So I've made a little library of help functions in C++ and Matlab which allow values to be pumped to binary files and live loaded into Matlab to be plotted while the C++ code is still running.
It's sort of like hooking up a debugger to C++ but with the ability to graph variables.
2
u/Malgranda Oct 24 '14
I personally prefer higher-level languages for most things. I'm not really concerned with speed (most computers are pretty fast nowadays) and writing Ruby or Java just feels more natural. Also, low-level languages always give me the feeling I'm doing things wrong, even if I'm not.
3
u/thorwing Oct 21 '14
I'm a programmer that's all about algorithms and speed. I always prefer Arrays over ArrayLists, do bit-wise operations where applicable, etc.
However, I like to do this in OO-languages where there's also much space for size and GUI-making.
What language do you suggest?
1
u/VerilyAMonkey Oct 21 '14
It's the same as with little engineering projects. It's really fun to rig up ridiculous contraptions out of simple bits and pieces found around the house (and duct tape, of course). Where a hilariously hacked together and unreplicatable object is actually the fun of it. But if I actually am going to build something, well, it's better for everyone if I use a high level language.
1
u/[deleted] Oct 21 '14
For me, it's more a question of "what" than "how." If you're doing something neat, I don't care how you did it. I don't believe we should be limited by our technology. That's not the point of technology at all.
Perhaps related to that, I don't normally find very low level stuff to be all that useful. It's possible this is simply because the "what" that I want to do usually doesn't involve devices that require that kind of thing.
1
u/Armunt Oct 23 '14
Its a question to go on over examples, you cant say you will build an entire enterprise infraestructure on scripting lenguages nor build a market site with OO languages.
1
u/[deleted] Nov 08 '14
I prefer high level - rapid prototyping, more fun.
1
u/maep Oct 24 '14
If I really want to understand a problem I solve it in a low level language.
import magicwon't make me a better programmer.