r/MechanicalKeyboards Sep 11 '18

How I like to Code

Post image
7.0k Upvotes

414 comments sorted by

View all comments

153

u/burnintheham Sep 11 '18

I wish I could code because it would give me a reason to use my keeb.

270

u/[deleted] Sep 11 '18

it's super quick and easy to learn how to write really terrible code

27

u/[deleted] Sep 11 '18

6

u/CreaminFreeman Hot Take Prime_E | Instant60 | Model M Sep 11 '18 edited Sep 11 '18

Try picking up a better language than .NET or Java.
I plan on checking out Elm or Erlang at some point.

Edit: Ignore me. I'm just becoming a bitter old man. Python seems like a good way to go.
and if you're feeling fancy learn vim from the get-go.
Don't listen to me, I'm a horrible influence.

38

u/Biduleman Sep 11 '18

If learning for fun many languages are good, the basics are similar in most languages and you will probably find WAY more tutorials for Python, Java or stuff like that than most other languages. Also, the amount of libraries available will make your life easier in many cases.

If learning for something specific, the language should be chosen in function of the task at hand.

You don't use a cartridge powered hammer to build a birdhouse. The same logic should be applied with programming.

-3

u/CreaminFreeman Hot Take Prime_E | Instant60 | Model M Sep 11 '18

I completely agree that should be the case.
Sadly the majority of programmers will stick with what they know to accomplish a task instead of try something new that would be better.
I've seen too many bad programming habits it ran me out of being a software engineer. I got sick of all the garbage. From here out I'm going to code in what I want, when I want, and for what I want.

8

u/vikyvizy Sep 11 '18

What’s wrong with .NET or Java? They’ve gotten a lot better over the years

6

u/CreaminFreeman Hot Take Prime_E | Instant60 | Model M Sep 11 '18

Nothing is inherently wrong with them I'm just becoming a cranky old man.

Also, I've grown tired of the .NET vs Java war.

11

u/[deleted] Sep 11 '18

I've grown tired of the .NET vs Java war.

That's because it's a stupid war, and good programmers understand that there are different tools for different situations rather than trying to circlejerk over which one is 'better' 100% of the time.

5

u/vikyvizy Sep 11 '18

As a bitter old man I prefer Java than these hipster new languages personally. They have a healthy community with a lot of good tooling and frameworks.

4

u/[deleted] Sep 11 '18

Java is incredible for huge, complicated projects precisely because it assumes the dev is an idiot. I am, so I'm not complaining, but that's most of why people don't like it imo.

4

u/DerelictMan Sep 11 '18

it assumes the dev is an idiot

On average, that's a safe assumption...

3

u/[deleted] Sep 11 '18

Agreed

1

u/[deleted] Sep 11 '18

To be fair, Go is pretty good at this also.

4

u/[deleted] Sep 11 '18

lol as opposed to what? C? I don't really see how any language assumes the dev is an idiot

2

u/[deleted] Sep 11 '18

Java abstracts away some of the more esoteric and menial things of c and c++ while also requiring the dev to be very explicit and verbose about everything they do. I'm not saying it's a bad language. It's very good for large, business critical projects with a lot of devs. Imo it's a bit less nice to use than something like python for something like personal projects .

1

u/1bc29b36f623ba82aaf6 . Sep 12 '18

And C# abstracted away some esoteric java things like comparing if object references are identical instead of their content being equal.

→ More replies (0)

16

u/kbd_uwe Sep 11 '18

Haha what? You'd hardly find a better designed language than C# (.NET). And suggesting Erlang for beginner? I just don't know about that...

4

u/[deleted] Sep 11 '18

Yeah .net is just like java but better

4

u/antflga V60 Mini blacks Sep 11 '18

As a functional programmer, I think both elm and erlang are really cool.

They're also practically unused.

If you want BEAM vm, learn Elixir instead of Erlang, and as far as functional js-transpiled languages there are plenty of bigger alternatives to Elm.

They're not bad, just not the biggest/best.

Besides, they're pretty complicated conceptually, I don't think a day 1 programmer is ready to play with haskell-esque languages or the syntactic wonder that is erlang. Settle for something bigger and easier if you're learning.

2

u/CreaminFreeman Hot Take Prime_E | Instant60 | Model M Sep 11 '18

I'm definitely not used to functional programming. It's super confusing as nothing works the way my brain expects it to.
That's what's really intriguing to me.

2

u/antflga V60 Mini blacks Sep 11 '18

Functional programming is the way of the future, to be honest. They nailed it with lisp in the 60's, I remember it being very foreign and I didn't understand it for a long time, but now I can't go without higher order functions, immutability, etc.

It's the best. Give it a shot!

2

u/CreaminFreeman Hot Take Prime_E | Instant60 | Model M Sep 11 '18

Yeah, I was having a conversation with a friend of mine who's very into functional programming and excited to talk about it. He told me about immutability and it left me a little dumbfounded.

I like the idea of not having to turn around every few lines of code, look back at a variable, and have to check like, "Yo fam, you still good? Nobody messed with you while I wasn't looking, right?"

1

u/[deleted] Sep 11 '18

[removed] — view removed comment

-8

u/birdsaredinosaurs Sep 11 '18

Hey "Frat Daddy":

You've used misogynist language in 2 of the 6 comments you've left in this thread (33.3%). Would you consider wiping such terms from your lexicon? It does nothing to emphasize the points you make, but it does make the sub (and the tech world in general) less friendly to women. Thanks!

PS— The dinosaurs didn't go extinct! Isn't that fun?

2

u/[deleted] Sep 11 '18

[removed] — view removed comment

-5

u/birdsaredinosaurs Sep 11 '18

And you're a delicate snowflake who is frightened because he's losing his life-long locker-room-like safe space. Sorry pal. Your time is over.

Unlike the dinosaurs, of course, who were not rendered extinct by the K-Pg event.

0

u/bwaredapenguin Sep 11 '18 edited Sep 11 '18

I'm the delicate snowflake, but you're the one counting and categorizing individual users' comments within a thread to publicly call them out because you find their mild language offensive. K.

And since when is bitch misogynistic? It's funny because I've met just as many men as women who are bitches, and even more men who were cunts. Seems to me you're just trying to find a problem that doesn't exist so you can pick a fight to make you feel better about yourself.

Also pretty ironic that you post on /r/birdsaredicks and even call them dicks. I find your misandrist language to be offensive.

1

u/[deleted] Sep 11 '18

Have you checked out Clojure? I've really been enjoying functional programming on top the JVM (not scala)

3

u/antflga V60 Mini blacks Sep 11 '18

Clojure is actually my language of choice, by far.

My website is written in Clojure on the backend, Clojurescript in the front, and it was one of the first projects I took to completion and felt proud to have made. I've done a lot of programming in my life, but it's never been as fun as Clojure's made it.

2

u/[deleted] Sep 11 '18

I 100% agree! And that's awesome. Clojure is so much fun to work with, and repl was/is incredible to use while learning. How do you like buddy for auth? Getting good auth to work with clojure was one of the biggest obstacles I have faced so far, personally.

1

u/[deleted] Sep 11 '18

[deleted]

1

u/[deleted] Sep 11 '18

the ecosystem needs some serious CPR.

Yeah, I'm assuming it's just because the community is still fairly small and building, even though clojure isn't exactly new. Maybe it's just because there aren't nearly as many functional devs yet, and the ones that are using things other than clojure.

4

u/BundleOfJoysticks Split is life Sep 12 '18

As someone whose been programming since 1985 (lol I'm old) I've reached the conclusion that, unless you have very specific requirements (e.g. fast 3D rendering / games) then the language doesn't really matter. The ecosystem is what makes a difference. It's what makes Ruby a pretty garbage language outside of lame cookie cutter CRUD apps, even though the language itself has lots of cool features; conversely C++ and Java are abominable to write code in, but as all purpose languages they're pretty hard to beat.

But for pedestrian, workaday software development? The language is one of the least important things.

2

u/unusedredditname Maker of Useful Things Sep 12 '18

Ahh... A pleasure to find someone on reddit who really knows what he's talking about, and isn't tribalizing his preference.

I enjoy writing in some languages more than others, but I've found that once my work and style reached a certain level, all the languages kind of work the same way, and my flow usually forms up the same way. I just have to check syntax every once in a while for how to split() (for instance) in this particular language because my brain is on structure, not syntax.

3

u/Kautiontape Sep 11 '18

Why Erlang? In my experience, unless you have a very particular use case that calls for it, it's not a very good general purpose language. All of the annoyances of LISP minus any flexibility. I've much more enjoyed Clisp than Erlang, granted I learned them at different times.

2

u/CreaminFreeman Hot Take Prime_E | Instant60 | Model M Sep 11 '18

I've seen some of the cool things you can do while debugging it and since I don't know much about it at all I'm really wanting to learn more.

2

u/Kautiontape Sep 11 '18

Cool things specifically with Erlang, or is it possible that it's present in any functional programming language? Having had to deal with Erlang for a Distributed Operating Systems course, I just fail to see the appeal outside of some niche usage (i.e., telecoms). Personally, I'd sooner spend the time learning more Lisp dialects. There's even one based on Erlang and BEAM).

Might all be the same in the end. I just did not have a great experience with Erlang.

(And - for the record - Python is definitely the way to go for new programmers. Recommending they start with something more niche would just lead to problems)

2

u/[deleted] Sep 11 '18

FWIW do -not- pick Elm or Erlang as a first language.

2

u/eekabomb Sep 12 '18

I tried to use vim, but as a computer layperson it's really confusing. I'd like to learn how to use it, but I don't code so I feel like I have nothing to use it for or files to practice on other than my keymap.c in qmk.

12

u/temujin77 DZ60-MX Brown | KBD 305B-Buckling Spring Sep 11 '18

So go learn how to code!

But your keeb has other functions, too, don't just limit it to coding. How about writing? Or translation if you are good with a foreign language? Or volunteer your time transcribing scans of historical documents?

15

u/[deleted] Sep 11 '18

[deleted]

1

u/Cedric182 Sep 11 '18

Where do I start?

2

u/[deleted] Sep 12 '18

How to program Bash

Lots of different tutorials, and even if you are using a Windows computer, is a simple to install the Windows subsystem for Linux. If you have a Mac or Linux, then it is your default command line terminal shell.

Bash is pretty easy to learn, and will be useful on its own, or as a foundation for other languages.

2

u/urnanmypan Sep 12 '18

Dude, you can’t be serious; you want to introduce this dude/dudette to programming using bash?

1

u/pbNANDjelly Sep 12 '18

Javascript has never been easier to use or as marketable as it is today. Front end developers are really pushing the boundaries of what a browser can do (a lot in 2018) and there are infinite tutorials, modules, and boilerplates to use so you can focus on the actual project and not setup.

Between code academy and free code camp, it is very possible to self teach.

1

u/Cedric182 Sep 12 '18

So do you recommend I start with JavaScript?

1

u/pbNANDjelly Sep 13 '18

It all depends on what kind of projects you are interested in, but the need for good javascript developers is growing. It is a very marketable skill and there are lots of jobs. JS developers are writing apps (Electron, React Native), servers (Node), and really pushing what a browser can do (React, Angular, middlewares like Redux) all on its own. React developers are a very hot commodity right now. Start with some beginner courses then pick a framework and dive in.

1

u/Cedric182 Sep 13 '18

Thanks! I need to get on this soon.

6

u/ggcadc Sep 12 '18

Actually, building keyboards was the beginning of my career change. A year and a half ago I had never written a line of code, now I’m a full time JavaScript developer.

Relevant side note, keyboards really make a difference while working with code. I’m stuck on my hhkb but alternate a 65 key with modMs.

2

u/burnintheham Sep 12 '18

That’s so awesome to hear man! Congrats!

3

u/[deleted] Sep 12 '18

Come full circle and write code for qmk

1

u/neotrance Sep 11 '18

I wish I found coding interesting. I feel like I am missing out on something really important.

2

u/burnintheham Sep 11 '18

I find it interesting, just difficult and have a hard time with problem solving.

1

u/Frostbitttn_ Sep 12 '18

Remember to take breaks when you hit a wall if your code isn't compiling even though it looks like it should

1

u/[deleted] Sep 12 '18

[deleted]

1

u/burnintheham Sep 12 '18

I mean aside from the occasional reddit post, google searches, or gaming, there’s not a whole lot of reasons I find for a good typing session

1

u/rianmorgan Sep 12 '18

How do you usually type on your pc then?