gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

OffTopic > Beating the code malaise...

#89450 - MrD - Sat Jun 24, 2006 11:29 pm

Have you ever been coding, and gradually slow into a hazy state of mind where you can't seem to get anything done? Or you start to get frustrated, and simply can't think at all? Or just gradually fall asleep on the keyboard, filling up the editor with infinite pages of space?

How do you folks get over that?
_________________
Not active on this forum. For Lemmings DS help see its website.

#89455 - tepples - Sun Jun 25, 2006 12:05 am

MrD wrote:
Have you ever been coding, and gradually slow into a hazy state of mind where you can't seem to get anything done?

Yes. I alt-tab to the web when that starts to happen.

Quote:
Or you start to get frustrated, and simply can't think at all?

Yes. I go take a nap and come back to the problem later.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#89457 - keldon - Sun Jun 25, 2006 12:08 am

Take regular breaks every hour like the manual says. Remember not to forget the power of breaks.

Besides you perform much better when you motivated. It is one of the reasons why schools give children regular breaks; and though you are not learning, you are still processing information so a lot of the rules for learning apply to work.

It is much more efficient to spend 50 minutes an hour in front of the computer doing a lot of work well than 60 minutes an hour in front of the computer doing a bit of work okay.

Food and drinks helps too; just don't get fat in the process. A 5/10 minute walk can help, it gets the blood flowing and allows you to clear your head.

#89494 - chishm - Sun Jun 25, 2006 4:13 am

I find when I can't concentrate, I'll tend to start browsing the web. However, that doesn't normally help, it only wastes time. When I'm stuck, I'll go for a walk or a bike ride. This gives me time to think it over without any distractions in front of me. When I'm really stuck, I just give up for the day. It's amazing what a good night's sleep can do. The point is, if you aren't being productive, do something else. You'll feel better for it.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com

#90658 - spinal_cord - Sat Jul 01, 2006 3:16 pm

chishm wrote:
I'll go for a walk or a bike ride. This gives me time to think it over without any distractions in front of me.


You mean your walking and cycling without looking where you're going? I don't think thats wize at all.. :P
_________________
I'm not a boring person, it's just that boring things keep happening to me.
Homepage

#90661 - tepples - Sat Jul 01, 2006 3:21 pm

spinal_cord wrote:
chishm wrote:
I'll go for a walk or a bike ride. This gives me time to think it over without any distractions in front of me.

You mean your walking and cycling without looking where you're going?

Some cities in some countries have a linear park with a comparatively low-traffic bike path.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#90684 - Ultima2876 - Sat Jul 01, 2006 7:17 pm

When I take breaks I tend to lose my chain of thought as I have a terrible short-term memory; sometimes it'll take me ages to remember what I was doing and how I was doing it, other times I won't be able to remember at all and will have to wait until later (when, oddly, I'll have no problem remembering).

I also find that I work efficiently whether I'm taking a break or not - I get motivation from seeing the results of my work, so I'm constantly motivated while I work.

#90706 - Lynx - Sat Jul 01, 2006 9:51 pm

Back when I was working as a "programmer" (It was mostly HTML/JavaScript/Sql stuff, I don't really consider it real programming), I would take a walk outside and sit and chat about things with other people. If they were also in a computer related field.. I would even discuss the issue with them... even if they didn't have anything to do with it, they would make suggestions.. sometime the way they "thought" about the issue would show you other ways to work around it.

If you don't have anyone around you to talk to about it, get on IRC and chat with someone about it.. If none of that helps.. take a nap.. :)
_________________
NDS Homebrew Roms & Reviews

#90718 - MrD - Sat Jul 01, 2006 11:20 pm

Ultima2876 wrote:
When I take breaks I tend to lose my chain of thought as I have a terrible short-term memory; sometimes it'll take me ages to remember what I was doing and how I was doing it, other times I won't be able to remember at all and will have to wait until later (when, oddly, I'll have no problem remembering).


I that that a lot. That's why I have a Ryo Hazuki style book full of 'mission objectives' that I write in every time I have a break from coding for whatever reason.
_________________
Not active on this forum. For Lemmings DS help see its website.

#90727 - tepples - Sun Jul 02, 2006 1:10 am

If you're doing SQL then you're doing PHP or Java or Perl, and that's real programming. If you're doing JavaScript and AJAX then that's programming too.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#90732 - Ultima2876 - Sun Jul 02, 2006 2:33 am

MrD wrote:
Ultima2876 wrote:
When I take breaks I tend to lose my chain of thought as I have a terrible short-term memory; sometimes it'll take me ages to remember what I was doing and how I was doing it, other times I won't be able to remember at all and will have to wait until later (when, oddly, I'll have no problem remembering).


I that that a lot. That's why I have a Ryo Hazuki style book full of 'mission objectives' that I write in every time I have a break from coding for whatever reason.


Good plan.

#90819 - Lynx - Sun Jul 02, 2006 7:57 pm

tepples wrote:
If you're doing SQL then you're doing PHP or Java or Perl, and that's real programming. If you're doing JavaScript and AJAX then that's programming too.


I look at it like this.. if I can do it.. it's not real programming.. because.. no matter how hard I try.. I can't learn to program.

And PHP wasn't even around back when I was doing this stuff.. Shoot.. if I wasn't such an idiot.. I could have been a millionaire when the internet boom took off.. cause that was what I was doing (only for an intranet).. Of course.. I waited till it collapsed before even getting involved with the ineternet side of it. <stupid, stupid, stupid!>.. Though.. I probably wouldn't have been smart enough to get out in time.. and would have ended up jumping off a tall building... and money isn't everything... Ah well.. the good ol' days.
_________________
NDS Homebrew Roms & Reviews

#90852 - PhoenixSoft - Sun Jul 02, 2006 11:57 pm

Lynx wrote:
no matter how hard I try.. I can't learn to program.


I believe that almost anyone can learn to write C++. It's like learning a spoken language - at first, you expect it to be difficult, so you take five minutes to construct a sentence before speaking it. Once it finally 'clicks', it becomes second nature, and you don't have to think at all. You will be able to think of a game, and pretty quickly work out which objects need to be made into classes, where you need your loops, how all the parts of your program should fit together, etc. You just have to keep at it until you reach that stage, rather than convincing yourself that you aren't smart enough to learn it.

#91201 - Lynx - Wed Jul 05, 2006 8:54 am

PhoenixSoft wrote:
rather than convincing yourself that you aren't smart enough to learn it.


Well, I didn't say that.. :/

:) Anyway.. Hmm.. I feel you either have it in you.. or you don't. I've taken (and passed) programming classes from basic to C++.

But, when I see simple stuff like this:

Code:

for(i = 0; i < sizeof(LetAPalette) / sizeof(uint16); ++i) {
    SPRITE_PALETTE[i] = LetAPalette[i];
    SPRITE_PALETTE_SUB[i] = LetAPalette[i];
  }


It looks like total gibberish to me. Always has.. Always will. :(
_________________
NDS Homebrew Roms & Reviews

#91392 - keldon - Thu Jul 06, 2006 10:32 pm

Well maybe the courses were no good.

#91448 - Lynx - Fri Jul 07, 2006 6:33 am

No.. Like any class, there is a big difference between "learning" what you are tought, spewing it back out, and passing the class... and.. actually learning and understanding what you are learning. After the 10+ years of trying to learn programming (C, C++, Perl, PHP, etc) I have yet to be able to really understand any of it to the point where I would consider myself a programmer and be able to write my own code. Don't get me wrong.. I can hack the hell out of any of those languages.. and edit/copy/paste code examples and stuff like that.. But, there is a big difference (again) between hacking others code and writing your own.. which is what I consider a programmer.

It's like computer hardware/electronics.. That, I understand.. But, I have seen a lot of people struggle to understand it, and sure.. they pass classes.. but like me with programming.. never really understood how it worked to the point they could design their own circuits.
_________________
NDS Homebrew Roms & Reviews

#91573 - keldon - Sat Jul 08, 2006 12:05 am

If people are passing a class they don't understand, the class standard/grading is wrong. You should pass modules you understand.

#91900 - gauauu - Mon Jul 10, 2006 2:42 pm

Often the teaching is where the problem is. The teacher or textbook cannot adequately explain a topic, so most of the class doesn't understand. Because most teachers grade on some sort of curve, it means that a significant part of the class can pass, as long as they can BS about the subject better than the other minority of the class.

My numerical methods class in college was like this. The prof was HORRIBLE...nobody had a clue what was going on. On the multiple choice final, I literally decided to spell words for half the exam (DAD, BAD, CAD, etc)...and I got a B.

#112308 - MrD - Fri Dec 15, 2006 3:41 am

keldon wrote:
If people are passing a class they don't understand, the class standard/grading is wrong. You should pass modules you understand.

I'm in the second year of university now, and I'm failing modules I understand because there's too much coursework. :(
_________________
Not active on this forum. For Lemmings DS help see its website.

#112309 - gauauu - Fri Dec 15, 2006 3:48 am

Odd....our daily coursework was always such a small percentage of our grade that you could mostly skip it, and if you did well on the exams, still get an A or B.

That was at University of Illinois (uiuc)

#112310 - MrD - Fri Dec 15, 2006 4:08 am

The coursework at Liverpool John Moores University is 30% of the course final mark, I believe. I could just submit a poor effort and still pass the course, but the quality my upcoming placement year will probably depend on my coursework. (Unless they like my DS game... ^_^)
_________________
Not active on this forum. For Lemmings DS help see its website.

#112320 - sgeos - Fri Dec 15, 2006 6:38 am

keldon wrote:
If people are passing a class they don't understand, the class standard/grading is wrong. You should pass modules you understand.
All depends on the school and the teacher. As far as module grading scales go, universities are money making businesses. The course prerequisites and requirements for passing reflect this most of the time. Giving people an "education" is just a sales line, although luckily some of the people that run universities actually believe it.

I know of virtually noone who goes to post secondary school to get an education. The value of post secondary school comes mostly in A) the chance to setup a social network that you can tap into for the rest of your life, B) the chance to do group work, and C) a piece of paper that says "hireable". Most of the people I know go for hireability without realizing the value of a social network and group work.

-Brendan

#112336 - keldon - Fri Dec 15, 2006 10:02 am

Socializing and learning group work was one of the conclusions me and someone a year behind me in uni agreed on. Many people start University courses without any idea of what they want afterwards; I on the other hand wanted to do games development.

Coursework is valuable for giving you practical knowledge. It is more important that you learn from your coursework than you pass it. What use is an B in something you cannot achieve? When you leave your course you will be going into the real world and using these skills practically.

#112344 - MrD - Fri Dec 15, 2006 11:46 am

I don't know about learning, but I'm led to believe that my university is one of the leading locations for diagnosed cases of psychological illness.
_________________
Not active on this forum. For Lemmings DS help see its website.

#112363 - Mark-io - Fri Dec 15, 2006 5:47 pm

Quote:
I believe that almost anyone can learn to write C++


IMHO you left out a vital part: anyone with half a brain can learn how to program. or at least fake it ! but i would not recommend C++ as a starting point to be honest.

#112397 - Lynx - Fri Dec 15, 2006 10:38 pm

Mark-io wrote:
Quote:
I believe that almost anyone can learn to write C++


IMHO you left out a vital part: anyone with half a brain can learn how to program. or at least fake it ! but i would not recommend C++ as a starting point to be honest.


So what are you saying? I don't have half a brain? j/k.. I disagree, unless you mean what I am going to enter into the drunkencoders.com Christmas compo makes me a programmer. Because, I did write the whole thing myself from scratch.. then I asked for a little help from Phoenix Rising.. and now I don't undertand half the code. He gets like that, because he has been a professional programmer with 2x years and I think his mind processes life in C++.

But, my point is how you define 'learn to program'. Just because I'm writing some crappy game using PAlib doesn't make me a programmer in my honest opinion. It's when you see stuff like this:

borrowed from some unreased source of PRs.. shh.. don't tell him :)
Code:

ostream& operator<<(ostream& s, const CardStack& c)
{
  CardStack::const_iterator i(c.begin());
  CardStack::const_iterator e(c.end());
  int card = 0;

  s << "[(" << int(c._x_pos) << ", " << int(c._y_pos) << ");"
    << "(" << c._cards_angle << ", " << c._fan_angle << ");"
    << "(" << int(c._front_magnitude) << ", "
    << int(c._back_magnitude) << ")] =";


And this program has 49 .c, .cpp, and .hpp files.. and it doesn't even do anything real yet (personal opinion, I doubt PR would agree with me).

That is complete crap to me.. So, if you understand it, I'd consider you a programmer.. Even if that is doing something extremely simple..

So, I'd fall into the "fake it" category.. And I'd guess that a lot of homebrewers would probably fall into the "fake it" category based off of what I consider a real programmer..
_________________
NDS Homebrew Roms & Reviews

#112431 - Ant6n - Sat Dec 16, 2006 9:35 am

if one feels like one is able to hack alot but you can't program, maybe he/she-who should learn about 'algorithms' and 'data structures'. And writing unreadable code doesnt make a good programmer.

I find the worst cases of code malaise i get when i have found a decent algorithm/design/data structure and then maybe even wrote the header files for them and then this stupid writing the actual thing out... its all in the head, but it takes hours to turn it into black ink in eclipse, and then debug that shiot, all the time wondering whether anybody is ever going to use that.

On a side note, how many people are ugrads here, anyway? and where?

#112435 - keldon - Sat Dec 16, 2006 10:42 am

Well I am a grad from London and took part in programming competitions to help with manipulating algorithms and data structures.