Use an IDE, not VIM
What are some things you wish you knew when you started programming?
41–50 of 102 posts
Re: What are some things you wish you knew when you started programming?
#42With them, you will be able to quickly and easily make your code better and better, with much less risk of regression.
As a result, the initial implementation details of your code are not very important, and you don't have to spend much time thinking about how the code might evolve in the future (which is unknowable anyway).
PS Don't spent much time testing the internals of your code. Check that the inputs and outputs are correct, as thoroughly as you can. Testing internals actually makes refactoring harder.
Re: What are some things you wish you knew when you started programming?
#43That the status of being a programmer would drop to subzero levels in the next two decades :S
Re: What are some things you wish you knew when you started programming?
#44Re: What are some things you wish you knew when you started programming?
#45Re: What are some things you wish you knew when you started programming?
#46I tend to want to know how _everything_ works; this let's me reason about anything and it helps a lot when debugging.
Re: What are some things you wish you knew when you started programming?
#47Although I had done some programming before, I always remember the first lecture of the first year of the CS course I did where the lecturer basically concentrated on the importance of KISS (i.e. Keep It Simple Stupid). He did say that we'd probably not believe him, and of course we didn't as we were all desperate to prove how awfully clever we were. He did also say that if we stuck at things long enough we'd probabl…
I had a huge argument today with someone that wanted to wrap a certain type of higher order function ("foos") in another higher order function with a particular name ("fooGenerator()") for the sole purpose of differentiating it from a different kind of higher order function in the same file ("bars").
I lost the argument. It turns out using heading comments to seperate groups of similar functions, or god forbid splitting up the 400 line file into multiple smaller ones, is too confusing and prone to errors by maintainers ("What if they put a new foo function in the section for bar functions!")
Re: What are some things you wish you knew when you started programming?
#48Learn from the Masters, do not seek advice in random people on Internet.
It is called "modeling". Pick your masters-mentors carefully.
For example we have people in my company that could do the work of tens or hundreds of people just by themselves because:
-they are incredible experienced and smart. -they know regular expressions, know how to automate everything. -they understand good design, and understand people as well as computers.
Just living around this people you will start modeling them, and doing the same they do.
But people also model bad behaviors just by proximity. Fat people use to have friends that are fat, and family members that are fat. The same happens with smokers or drug addicts. You pick from your surroundings subconsciously.
For example someone here recommends you to not use vim, use an IDE. Well , the masters I know either use vim or emacs a lot. They can use other tools like IDEs too, but instead of depending on someone else for automating the stuff they need they use to make their own tools.
Remember that no big company like Microsoft, Apple or Google are going to make your life easier for making your software multi platform for example, but for your company it could be essential. On the contrary, if you only use their tools your life will be miserable if you go against the interest of those companies.
Re: What are some things you wish you knew when you started programming?
#49Write 5 tests for a piece of code that you think is working but has no tests. You will find at least 1 bug every time. Staying at work longer won't help you produce more and better code. Sleep and exercise will. People who get angry about technical choices like what framework to use or what coding style or how tightly to enforce rules will flame out. Don't be that person. If you think you need to rewrite it from scra…
Re: What are some things you wish you knew when you started programming?
#502. The design and specification stages of programming are not pointless enterprise makework, they are genuinely useful.
When writing a program, make sure you understand what you're trying to achieve in detail, and write a plan about you intend to do that.
If you don't know what you're trying to achieve (and by extension your customer/client doesn't either), schedule in some research / exploration work as the first part of your plan.
Once you have a better idea, redo your plan (and maybe your budget) and check it with your customer/client.
3. If something is going wrong, or you think something is going to go wrong, it's much better to tell someone as early as possible. Even if it's your fault, don't sit on your shame - get some help.
For example, if you're going to go over budget, you may be able to get some more budget. Or you may be able to get some features cut.