|
You believe you are proficient, but I'm afraid all you really know is how to spell the keywords. With many years of practice, you will suffer less frequently from these periods of inability to move forward. Bad news, huh?
It's called "coder's block": writer's block for code. You get over coders block by...wait for it...coding. Partly this means experience coding, but it also means not allowing yourself to be blocked. You must write something.
- If you can't write a function, try writing just the function signature
- If you can't write the signature, try writing an introductory comment
- Try writing a unit test that uses the function, to see how you will use the thing you want to write
- Get out a blank sheet of notepaper and try writing a few phrases or keywords about what you want the function to do
Just as soon as you have written something, you will begin to review it mentally. You'll begin to see if you like it. You'll engage whole new subsystems of your brain to work on the problem.
A separate problem is that you have to have some familiarity with each library you use. It takes a long time to look at all the documentation for a library to see if it has a function you need. Not so long to remember what order the arguments are in. But this is just temporary.
|
|
|
|
|
John Robbins has some good advice on debugging with .NET. Pick up one of his books or see what is otherwise available. I haven't checked this particular presentation, but channel 9 has this presentation.[^]
My professor (who became a Touring award winner...) had a very specific principle for proving code: Define INVARIANTS in your code. That means you have known expectations of variables (and state) at specific points. Test for those. .NET provides Debug.Assert which allows you to test for those invariants and doesn't require you to remove them for production (just use build configuration).
Add to that by considering test first (test driven development), or at least keep testing in mind when you code.
Many other great insights posted here - I can vouch for pretty much all of them after almost 40 years in the business.
When it comes to extended sessions - that boils down to how much you can mentally keep track of and how TIRED you are. Some times, nothing beats being "in the zone" for an extended period, but only when you are actually making noticeable progress or following multiple leads. But when you start to spin your wheels, you are probably better off taking a break.
I like to do Sudoku puzzles, and the ones I have trouble with at night before bed are usually quickly solved the next morning. Same thing with programming challenges.
* Learn and practice using patterns.
* Describe problems out loud or in writing. That forces you to think them through.
* Learn by teaching others. That challenges you to know.
* Don't rely on what you know - things change. I have had to unlearn more things that I have had to learn. Look it up.
* Get comfortable with a good search engine (I like DuckDuckGo.com). Realize that not all answers on line are good answers.
* Have fun coding, and don't forget to have a life away from a keyboard and screen.
|
|
|
|
|
I am a newbie too. I went through all the tutorial videos a couple of times. I entered the code that was offered up by the speakers and played with it.
Once I got past that and wanted more, I found that there are problem sites that present problems or challenges to be solved. SPOJ and HackerRank are ones that I am familiar with. Sometimes I spend days on a problem. The problems introduced me to all kinds of programming and debugging techniques that I normally would not have encountered otherwise. Working on XOR-ing the contiguous subarrays right now. Programming Problems and Competitions :: HackerRank[^] Driving me crazy.
Being an feisty old guy with just a desire to learn something new I am under no pressure to learn as fast and as much as I can. I program for fun. Do not want a job or need a job. I just feel a big sense of accomplishment when I get a problem right. It is sad that most of my age group just sit around and watch TV all day in their retirement and don't even know how to turn on a computer.
Keep plugging and try the stuff on Hacker Rank or SPOJ. I use Snippet Manager to collect bits and pieces of code that I constantly refer back to. It seems pretty primitive but I cannot find anything better.
|
|
|
|
|
I reached in the fridge for the milk to put in my morning coffee (heartstarter). The expiry date on the bottle was 11 JUL 16 . My initial reaction was "That's 5 years out of date!"
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
ah huh .. and your profile says you're here in Aus .. now, if you were in USA, I might understand
|
|
|
|
|
I've been using sortable date formats for years, so year month day is a natural parse for me. I just have to remember that it's not natural to everyone else.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
well, I guess, this being a forum inhabited largely by software type people, thats acceptable (elsewhere, I have to force myself not to '/' my '0's because I get funny looks .....)
|
|
|
|
|
It's the sortable date layout. I've done the same kind of thing myself.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Good News Of The Day
Sharp-Shooting Army Veteran Saves Bald Eagle Stuck Up A Tree[^]
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
|
You can trust Calvin to be mercenary about anything!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I really miss Watterson, but he wanted to quit when he was on the top, and I guess he did just that.
|
|
|
|
|
same with Gary Larson! I like Watterson, but Larson...
|
|
|
|
|
Went to Google Earth and then to the Web version: Google Earth[^]
And got this message:
Your browser does not support the Google Earth Plug-in
Please try again with the latest version of one of these browsers:
Firefox (32-bit)
Internet Explorer 7-9 and 10-11 with Compatibility View (32-bit).
Learn more »
To view maps in 3D, you need the Google Earth Plug-in
My browser? Google Chrome...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Same here.
Marc
|
|
|
|
|
It seems Google do not develop actively Google Earth anymore, you have Google Maps instead...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Yeah, that's where I went afterwards.
Just made me laugh that Google have to suggest you use IE!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
U.S. Acres[^]
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Just saw an article: What is driving Wales' stunning Euro 2016 success? What do they have that other teams don't?
Isn't it obvious - they have sheep!!!
It is truly remarkable. A team didn't even qualified for nothing sine 1962 (44 years!)...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
They also have the Wales Gene Park | Genome Editing and Transgenics[^].
(AKA Home of the vicious attack sheep )
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Well, Kornfeld, I must say "baa" to the idea that the secret of the current Welsh soccer renaissance lays with in their sheep.
I think it's poetry; did you know that there has been an annual poetry/bard contest in Wales since the 12th. century (A.D. in the Christian calendar) ? [^].
cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
BillWoodruff wrote: bard contest in Wales I have heard of it - is is one of the subject we have to learn about in Hungary (at least in my time there)... [ARANY JÁNOS] A WALESI BÁRDOK[^]
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
England has sheep (the UK as a whole is the 8th most sheep populous country in the world) and it didn't do them much good. I think ewe is trying to ram in a bit of wooly thinking there.
The reason for Wales' success is much simpler. They've hit upon this weird and exotic tactic of scoring goals - too old school for all those modern coaches in other countries but there you go! Highest scorers in the tournament and the only team averaging 2 per game.
I am not a number. I am a ... no, wait!
|
|
|
|
|
9082365 wrote: They've hit upon this weird and exotic tactic of scoring goals
You don't mean...
...no, it can't be that simple...
...more goals equals you win the game?
Why did nobody tell the England manager that years ago?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|