Live data from Hacker News

Ask HN: Which tools have made you a much better programmer?

news.ycombinator.com

321–330 of 519 posts

Re: Ask HN: Which tools have made you a much better programmer?

#321
post #74

Writing the overall design in plain English before writing the implementation. Not super detailed, but the main data structures and invariants and mechanisms that will make the implementation working. Then start the implementation refining such document as I discover new things.

This, most of all. Substitute native language if not English; the important thing is that the project be defined and developed in both a human language and a computer language, so that mismatches can be identified and resolved.

  * Start by describing what you are trying to do.
    * Specifically.
    * Not 'build a web business to enable users to achieve their
      potential', not 'create another library for X but simpler'
      but *specifically what the software will do* and, most
      importantly, the priorities of scope increase (it'll happen
      anyway; just get the priorities and their order down in
      text ASAP).
    * Put it in a readme.txt or something.

  * For any given subsystem of the code (meaning: any section
    which can sort-of stand on its own) write another such file,
    in more detail.

  * Let these files guide your tests too.

  * Keep them up to date. If priorities change, *start* by
    updating the readmes. The code isn't immutable; nor is the 
    plan. But the plan comes first.

  * When unsure how a new subsystem or feature is going to work,
    write out your ideas and thought processes in text. Don't
    start coding at all for a day or two after you sketch out the
    basics. *Append* to this file instead of replacing large
    parts.
[edit] Wasn't intended to quote that part (sorry to mobile users) but I can never remember how to get bulleted lists on this site...

Re: Ask HN: Which tools have made you a much better programmer?

#322

Earlier quoted context omitted.

I moved to awesomewm a few years back and I absolutely love it. I can open half a dozen terminals at once and they'll all automatically be ordered in a way that's immediately useful to me, where all the terminals are visible and (largely, depending on the automatic layout set) equally sized. And if I want another layout, I just press one combination to cycle through all the layouts I've configured. tmux doesn't give…

Sorry to hijack your comment, but do you know of resources I can read to write my own custom layouts using awesomewm? I have a 21:9 monitor, and would like to write a layout where I can have a game running in 1080p + some windows on the side. Currently I do this just fine with floating windows, but surely there must be a way to use the tiling system.

Hah, it's probably possible, but awesomewm's documentation for this kind of thing isn't great. I've looked into it but was put off by the complexity since I don't have that much time to spend on that kind of thing. I did find a couple of links that might be helpful as a jumping off point?

https://stackoverflow.com/questions/5120399/setting-windows-...

https://stackoverflow.com/questions/45411844/before-diving-i...

Re: Ask HN: Which tools have made you a much better programmer?

#323
post #26

The Jetbrains suite. Lightens the cognitive load, makes it easier to refactor and keep code tidy. All of which allow me build better software. For almost everything else e.g. git, learning how to use the command line instead of a UI is the best way for me to learn how the tooling works.

I agree. I’ve been using IntelliJ ultimate for a few months now and I don’t see myself going back to sublime or emacs. I do work mostly with ruby, typescript, golang and occasionally clojure. I recently found out that with the Ultimate version, you can install all the language plugins and won’t need the other IDE like Goland, rubymine, webstorm etc... They’re just plugins. So all your settings can live in one place

Re: Ask HN: Which tools have made you a much better programmer?

#324

TabNine: https://www.tabnine.com/blog/deep (the code are GIFs which I had to click to play) This thing is fucking magic. It's ML autocomplete, with help from 'traditional' autocomplete methods that use static analysis. Instead of just completing one token at a time like traditional completers, it can do entire sentences or multiple lines of code in one go, and is freakishly accurate. And since it parses language it h…

Similarly, Kite [0] for Python and JavaScript. I actually prefer Kite to TabNine, but ymmv. [0] https://kite.com/

Kite got criticism for tracking and injecting ads.

https://qz.com/1043614/this-startup-learned-the-hard-way-tha...

Re: Ask HN: Which tools have made you a much better programmer?

#325
Resharper (and now all the various Jetbrains tools) - from the early days, this tool allowed you to aggressively and automatically refactor code. Before that, in the C# world ( and many other languages ), there was very little in the way of automatic refactoring tools. Not to mention it's automatic suggestions on code transformations or more efficient use of the language are super useful.

Vim Bindings - While I often don't use Vim, I use Vim binding in most any environment I use. I don't know if it really made me a better programmer, but it improves the experience of programming.

Unit Testing tools - making code testable makes code modular.

Visual Studios Debugger, fantastic debugging tool from years and years ago. While I don't use it as much anymore, it's been a useful tool in understanding code.

Google Search, transformed the way to get information, coding information was hard to come by a few decades ago, now it is prolific.

Re: Ask HN: Which tools have made you a much better programmer?

#326

Earlier quoted context omitted.

Re. Sidenote: It doesn't look like there are many terminal emulators with tmux built in¹, but you can bind a keyboard shortcut to `xterm -e tmux attach'. (rxvt[-unicode] and st also support the -e flag, to run a given command instead of the default shell). 1: https://unix.stackexchange.com/questions/189805/what-termina...

That would work if I was running tmux locally, but what about when I’m running tmux on a remote server?

Maybe use `xterm -e remote-tmux' where `remote-tmux' is a small script in your $PATH similar to https://stackoverflow.com/questions/27613209/how-to-automati... ?

Re: Ask HN: Which tools have made you a much better programmer?

#327
post #320
post #289

Earlier quoted context omitted.

The thing about learning Latin (not that I am great at it), at least for an English native speaker, and the epiphany English language speakers have, is the realization that language can have structure and can be discover-able, if I know a root word then I can almost be sure that I know the meaning of con, re, dom etc. There is just no equivalent to that in English other than the Latin origin words we borrowed, becaus…

Isn't beaucoup French?

Yes it is - France has colonised part of vietnam

Re: Ask HN: Which tools have made you a much better programmer?

#328
post #26

The Jetbrains suite. Lightens the cognitive load, makes it easier to refactor and keep code tidy. All of which allow me build better software. For almost everything else e.g. git, learning how to use the command line instead of a UI is the best way for me to learn how the tooling works.

Just downloaded the GoLand 30 day trail. First impressions are I now remember how slow and stuck in goo java based IDEs feel. What cool stuff should I look at as I am willing to be sold on this.

at least for JS, the refactoring tools save a lot of headache. write code before deciding on variable or function names and then one click to refactor everywhere in the codebase.

Re: Ask HN: Which tools have made you a much better programmer?

#329
post #74

Writing the overall design in plain English before writing the implementation. Not super detailed, but the main data structures and invariants and mechanisms that will make the implementation working. Then start the implementation refining such document as I discover new things.

I'm trying to be better at this. Any examples/recommendations you could share?

Not sure if this is what antirez had in mind, but when I'm working on stuff, I whiteboard (if I'm at home--and who isn't these days) or write in a notebook.

First thing I figure out is how I want to interact with a thing. Whether that's a program or a class or a function. How do I want to call it? What parameters do I want to pass? What do I want it to return? How do I want to use what it returns? So, basically, write the interface first.

If I'm building something with multiple parts rather than a single class or function, I'll map out how these things all work together. A loose graph of interactions. Invoke A and have it return X; invoke B and pass X to it and it returns Y; etc.

Then I'll consider failure modes and think about what should happen if something doesn't work out quite right. Is it possible to route failures to a centralized cluster of error handlers so I don't have to implement error handling at every level?

Finally, I'll think about whether I can map behaviors to defined data structures instead of controlling flow with if/else patterns.

Once I have all that written down or mapped out, then I'll start implementing from the outside in. Stub the object, methods and return dummy data structures that fit until I have a complete system that's interacting the way I want. Then I go in and implement the actual functionality I need.

The last part--implementing functionality--often implies modifications to my initial thought process. But it's easier to understand what those changes affect if you've already mapped your design. So you might think B can produce Y with I parameter. Maybe it turns out you can't. So now you need to add a new param. Where is that going to come from? Well, you don't have to invent that out of nowhere because you've already mapped out what is happening. You know that you need to either add another node to the call graph or change the return value somewhere else.

By the end of the process, you have a working program, and you've also done a lot of your documentation work as well.

Again, I have no idea if this is what anyone else is talking about here. But this is how I personally work. It annoys the hell out of some people. But it works for me and helps me create sane software with interfaces people can remember over time.

Re: Ask HN: Which tools have made you a much better programmer?

#330
post #314

Earlier quoted context omitted.

I guess it's only for PHPStorm and ending it about 14 hours from now https://www.jetbrains.com/lp/php-25/

Oh darn, I already have WebStorm and PHPStorm. Cheers.

The discount applies to renewals too.
Post reply on HN