 |
Linux Format forums Help, discussion, magazine feedback and more
|
| View previous topic :: View next topic |
| Author |
Message |
Hudzilla Site admin

Joined: Mon Apr 04, 2005 12:52 pm Posts: 265 Location: LXF Towers
|
Posted: Thu Feb 04, 2010 10:43 pm Post subject: |
|
|
Hey!
Bazza: please do take any programming competitions into their own thread
Marrea: I do a lot of C-like languages, like PHP, C#, C++, etc. These all have very similar syntax: lots of { and }, lots of ; and lots of ( and ).
A few months ago, I wrote a little library for Python called Gloss (www.tuxradar.com/gloss), which has quite a different syntax to C, so when I returned to C# I was making these kinds of errors all the time - missing braces, missing semi-colons, etc.
For me, because I have this C stuff on quite a deep level in my brain, it's pretty easy for me to get back into "C mode" after an hour or two. But for you it will take a little longer because it's your first time: you will stare at errors like this and have no idea what's causing it... but when you spot the fix, you'll remember it along with the symptoms, and be much faster to fix it next time.
There are lots of problems you'll come across, but the one I hate the most is the missing brace: you think you've closed a foreach loop, but actually you've just closed the Main() method, which means everything afterwards causes epic-level errors for MonoDevelop.
Fortunately, careful indenting of your code means it's fairly easy to find these problems. Also, newer versions of MonoDevelop dot little red scribbles around to show you when your code is wrong - it's not perfect, but it can often point you in the right direction.
Paul |
|
| Back to top |
|
 |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2366 Location: wigan
|
Posted: Fri Feb 05, 2010 12:18 pm Post subject: |
|
|
i don't know whether you're a command line jockey or an ide person, but if you use eclipse or similar ide it will point out missing braces etc, admittedly it does make for lazy coding but it's just a suggestion, i always try to learn a new language using the command line as it teaches you to look for mistakes rather than having them auto-checked finding errors is just part of the learning process
paul _________________ i am a follower of the culture
 |
|
| Back to top |
|
 |
Ram LXF regular

Joined: Thu Apr 07, 2005 10:44 pm Posts: 1547 Location: Guisborough
|
Posted: Fri Feb 05, 2010 1:01 pm Post subject: |
|
|
| 1slipperyfish (troll) wrote: | finding errors is just part of the learning process
paul |
But how do we fix you.....  _________________
Ubuntu LXDE 12.04 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
|
|
| Back to top |
|
 |
Marrea LXF regular

Joined: Fri Apr 08, 2005 10:32 pm Posts: 1846 Location: Chilterns, West Hertfordshire
|
Posted: Fri Feb 05, 2010 7:52 pm Post subject: |
|
|
| Hudzilla wrote: | | But for you it will take a little longer because it's your first time: you will stare at errors like this and have no idea what's causing it... but when you spot the fix, you'll remember it along with the symptoms, and be much faster to fix it next time. |
Couldn't agree more. A bit like Linux generally, really. I've learned so much by not simply reinstalling every time something goes wrong but doing my best to research the problem and get it solved without taking the easy way out.
| Quote: | | Fortunately, careful indenting of your code means it's fairly easy to find these problems. Also, newer versions of MonoDevelop dot little red scribbles around to show you when your code is wrong - it's not perfect, but it can often point you in the right direction. |
Yes, I've seen quite a few of those red scribbles this last week! |
|
| Back to top |
|
 |
Marrea LXF regular

Joined: Fri Apr 08, 2005 10:32 pm Posts: 1846 Location: Chilterns, West Hertfordshire
|
Posted: Fri Feb 05, 2010 7:57 pm Post subject: |
|
|
| 1slipperyfish (troll) wrote: | | i don't know whether you're a command line jockey or an ide person |
I'm too new to all this to have a preference yet. But so far I'm happy either way. However, in the magazine Paul seems keen for us to use the command line so I shall probably be concentrating on that. |
|
| Back to top |
|
 |
Hudzilla Site admin

Joined: Mon Apr 04, 2005 12:52 pm Posts: 265 Location: LXF Towers
|
Posted: Fri Feb 05, 2010 11:03 pm Post subject: |
|
|
| Code and build from the GUI; run from the command-line. This makes running commands with parameters so much easier! |
|
| Back to top |
|
 |
Marrea LXF regular

Joined: Fri Apr 08, 2005 10:32 pm Posts: 1846 Location: Chilterns, West Hertfordshire
|
Posted: Sat Feb 06, 2010 12:33 pm Post subject: |
|
|
| Hudzilla wrote: | | Code and build from the GUI; run from the command-line. This makes running commands with parameters so much easier! |
Thanks for the clarification.  |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|