Go to Post FIRST kids never cease to amaze me. - Wayne C. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 24-01-2003, 01:29
Noah's Avatar
Noah Noah is offline
Code Monkey
#0861 (The Gondobots)
Team Role: Programmer
 
Join Date: Apr 2002
Location: Venice, California
Posts: 139
Noah has a spectacular aura aboutNoah has a spectacular aura about
Send a message via AIM to Noah
Lightbulb Hints For Rookie Programmers

Thought I would lay down a couple guidelines:

1) Never program when you have less than 6 hours of sleep in the past 24. IT DOESN'T WORK (Without a lot of coffee)

2) Always initialize your PWM outputs to 127. If you don't it will default to 0. (0 is full reverse. I forgot to initialize my motor outputs. We turned on the robot, and it went backwards full speed and almost bashed one of our engineers in the shins... )

3) Don't forget to increase those counters! (Well... I forgot this crucial step in one loop in our autonomous program... our robot was spinning in a circle for about five minutes)

Ok, they're obvious, I know... just thought I'd share them. Anyone got any others to add?
__________________
"It's broken? NOOAAHH!!! This is your doing, isn't it!"

"We can fix it in the software!"
"It's a BROKEN GEAR!"
  #2   Spotlight this post!  
Unread 24-01-2003, 01:34
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
sleep.... programmers don't need sleep. I have fallen asleep coding before. Thats when u stop.
__________________
1139 Alumni
  #3   Spotlight this post!  
Unread 24-01-2003, 01:42
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: Hints For Rookie Programmers

Quote:
Originally posted by Noah

1) Never program when you have less than 6 hours of sleep in the past 24. IT DOESN'T WORK (Without a lot of coffee)
In that case, I don't think I'd ever be able to do any coding, much less be able to code during the build season. Sleep is for the weak!

Anyway, some other good ones:

*Always make sure your CON stuff matches your SERIN.

*Always test code before uploading it to the robot.

*Never let an ME person touch the laptop.

*~ is not (no pun intended) the same as NOT.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #4   Spotlight this post!  
Unread 24-01-2003, 01:45
Noah's Avatar
Noah Noah is offline
Code Monkey
#0861 (The Gondobots)
Team Role: Programmer
 
Join Date: Apr 2002
Location: Venice, California
Posts: 139
Noah has a spectacular aura aboutNoah has a spectacular aura about
Send a message via AIM to Noah
While the code I write at 4:00 am is a great deal more efficient and interesting than anything I write while under the influence of sleep, No-one (Myself included) can ever reason out just what I did. I almost always end up rewriting such code (In a signifigantly more obvious way) later. In the end, I would have saved my own time by sleeping when I was programming and programming when I was sleeping. (Of course, I haven't slept recently as I write this, so perhaps I'm a bit of a hypocrite). Of course, when I'm awake I also don't forget to increment my counters and such...
Granted, that was when I had gone for 36 hours without sleep, but even so, that was pathetic. ::Bangs head against wall for miserable failures::
__________________
"It's broken? NOOAAHH!!! This is your doing, isn't it!"

"We can fix it in the software!"
"It's a BROKEN GEAR!"
  #5   Spotlight this post!  
Unread 24-01-2003, 02:01
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
Originally posted by Noah
While the code I write at 4:00 am is a great deal more efficient and interesting than anything I write while under the influence of sleep, No-one (Myself included) can ever reason out just what I did.
You mean like this line taken directly from RoboEmu (comment included)?

Code:
*(unsigned int *)((int)out+i*sizeof(unsigned int))=result; //have fun figuring out this one

If this line ever fails, I'm going to have to delete it (and most of the surrounding function) and start over. It seemed like such a good idea at the time...
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #6   Spotlight this post!  
Unread 24-01-2003, 22:28
Cipher X's Avatar
Cipher X Cipher X is offline
Registered User
no team (Former SigmaC@t Member)
 
Join Date: Jan 2003
Location: Sunrise/Ft Lauderdale, FL
Posts: 39
Cipher X is an unknown quantity at this point
Send a message via AIM to Cipher X
Exclamation Freakin DEBUGS!!

All i got to say is that DONT use too many debug statements { I dont belive they tell you this in the manual}

I was writing code for a neighboring team {947} and they were using a potentionmeter and i was just testing it out seeing what values it was outputting. But on top of that i just wanted to make sure that i was getting all teh right inputs and i was giving out all the right outputs. By the end of it i wound up with like 13 {some stupid number} DEBUG statements. Now all of a sudden the Revolving light turn off and on and all the motors work and then doesnt work and then works etc.. Now i took out all the Debug statements and everything worked fine. I think its because the timing for the DEBUG statements is too long and maybe too many of them makes the whole loop go so much slower that the controller looses its timing i guess. only thing i could think off. But remember try not to use more than like 10 DEBUG statements Max at once. I dont know if PBasic 2.5 fixes this but i am pretty sure it doesnt i have tried it out yet.

Cipher X
__________________
"Whatever you do will be insignificant, but it is very important that you do it."
-Mahatma Gandhi
  #7   Spotlight this post!  
Unread 25-01-2003, 05:30
Jferrante Jferrante is offline
Registered User
#0506
 
Join Date: Aug 2002
Location: New York
Posts: 67
Jferrante is an unknown quantity at this point
Send a message via AIM to Jferrante Send a message via Yahoo to Jferrante
I am afraid that despite the complaints of the useless posts I must add in the classic line that is all to needed in this thread.

What is sleep and where can I download it?
  #8   Spotlight this post!  
Unread 25-01-2003, 06:25
FotoPlasma FotoPlasma is offline
\: |
no team
 
Join Date: Jul 2001
Rookie Year: 2001
Location: San Jose
Posts: 1,900
FotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond reputeFotoPlasma has a reputation beyond repute
Send a message via AIM to FotoPlasma
Quote:
Originally posted by Jferrante
What is sleep and where can I download it?
I've been looking for a cracked copy for weeks... No luck yet. I guess I'll stay up and keep searching...

As for programming tips, keep a copy of the Basic Stamp Manual handy. If you're ever unsure of the syntax of a command, you can alway lookup it, hyuk hyuk.

If you ever REALLY need to stay awake (like, life threatening emergency, or just for fun) Sobe Adrenaline Rush will most likely do it for you, and it tastes good, too.

Oh, listen to music that won't agitate or otherwise negatively affect you. You're going to get pissed off at your code enough as it is, without sub-par music blasting in your ears. Pink Floyd, The Beatles, Phish, Tool... whatever you're comfortable with.

One last thing. The light of your computer's monitor is ALWAYS enough light to work under.
__________________
I played hacky sack with Andy Baker.

2001-2004: Team 258, The Sea Dawgs
2005: Team 1693, The Robo Lobos
  #9   Spotlight this post!  
Unread 25-01-2003, 07:39
Dave... Dave... is offline
Registered User
#0005 (Robocards)
 
Join Date: Aug 2001
Location: AFL/MHS Melvindale, MI
Posts: 64
Dave... will become famous soon enough
Quote:
*Never let an ME person touch the laptop.
I guess I'm in trouble since I'm an ME and the programmer for the past three years.

Did a pretty good job of winging it though, eh? Never crashed the robot into my own shin (or anyone else's, but came close)
  #10   Spotlight this post!  
Unread 26-01-2003, 16:33
Curtis Williams Curtis Williams is offline
Registered User
#0588 (Team 588)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Jacksonville, FL
Posts: 122
Curtis Williams is on a distinguished road
Send a message via ICQ to Curtis Williams Send a message via AIM to Curtis Williams Send a message via MSN to Curtis Williams Send a message via Yahoo to Curtis Williams
Crashing into a shin? We should be so lucky. The MEs didn't listen when I told them to back away during testing. One got smacked in the jaw with a van door motor when the robot went full reverse.

Anyway, sleep is the absolute worse thing you can do to yourself while programming. After sleep you are too energetic to sit down and code. You have to stay on the edge where you are too sleepy to run outside, but awake enough to code. Every time you sleep you are loosing the 8 hours taken by sleep, and 16 hours because your energy level is too high. If you keep this "good sleep" up you will never have good programming time. You must stay awake, and when you hit the edge, you must stay there. Caffeine helps.
  #11   Spotlight this post!  
Unread 26-01-2003, 18:43
Raven_Writer's Avatar
Raven_Writer Raven_Writer is offline
2004 Detroit & Pittsburgh Winners
AKA: Eric Hansen
FRC #0005 (RoboCards)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Melvindale
Posts: 1,549
Raven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really niceRaven_Writer is just really nice
Send a message via ICQ to Raven_Writer Send a message via AIM to Raven_Writer Send a message via MSN to Raven_Writer Send a message via Yahoo to Raven_Writer
Quote:
Originally posted by Dave...
I guess I'm in trouble since I'm an ME and the programmer for the past three years.

Did a pretty good job of winging it though, eh? Never crashed the robot into my own shin (or anyone else's, but came close)
lol. Also came close to crashing an old robot into the ground, and running into a few members (the good times).
__________________
AIM: wisprmylastbreth
EMail: nightskywriter@gmail.com
Y!: synsoflife

"ai yoru ga" -- "Love the nights"
  #12   Spotlight this post!  
Unread 26-01-2003, 21:55
EvanG EvanG is offline
Alumni fly-tackle bait
None #0177 (Bobcat Robotics)
 
Join Date: Mar 2002
Location: S. Windsor, CT
Posts: 44
EvanG will become famous soon enoughEvanG will become famous soon enough
As a programmer, i can say i've found that having a close to hand set of switches with a kill switch is effective for when your bot decides to go AWOL... until the kill switch solder breaks.

Last edited by EvanG : 26-01-2003 at 22:02.
  #13   Spotlight this post!  
Unread 26-01-2003, 23:36
Anthony Kesich's Avatar
Anthony Kesich Anthony Kesich is offline
Programmer Turned Engineer
AKA: SonKenshin
#1097 (Site 3 Engineernig)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Sacramento, CA
Posts: 186
Anthony Kesich has a spectacular aura aboutAnthony Kesich has a spectacular aura about
Send a message via AIM to Anthony Kesich
Red face sleep

Quote:
Anyway, sleep is the absolute worse thing you can do to yourself while programming. After sleep you are too energetic to sit down and code. You have to stay on the edge where you are too sleepy to run outside, but awake enough to code.
Its true, i tell ya. Every week, we have at least one 12-hour meeting, and for at least the first 8 hours i do almost no programming, unless we need it desperately (I'm normally found trying to pose as a grease monkey ). But for those final 3 hours or so, i get [b]everything[b] done. I used to think it was just me, but it seems i'm wrong.

-Anthony
__________________
C is screwing up my English--I'm ending all my sentences in semi-colons;

Horray for most things! -George Carlin

"Sure, I'll play rugby. Besides, I have a lot of experience running from really big guys who want to cream me." -Me, Freshman year
  #14   Spotlight this post!  
Unread 26-01-2003, 23:52
redbeard0531 redbeard0531 is offline
Registered User
#0686 (Bovine Intervention)
 
Join Date: Jan 2003
Location: New Market, MD
Posts: 40
redbeard0531 is an unknown quantity at this point
Send a message via AIM to redbeard0531
Re: sleep

Quote:
Originally posted by Anthony Kesich
[b]Its true, i tell ya. Every week, we have at least one 12-hour meeting, and for at least the first 8 hours i do almost no programming, unless we need it desperately (I'm normally found trying to pose as a grease monkey ). But for those final 3 hours or so, i get [b]everything done. I used to think it was just me, but it seems i'm wrong.

-Anthony
You must be sleep deprived

if 8 + 3 = 12 then GOSUB HelpMe

HelpMe:
Grade = Grade MAX 2 ' sends me back to second grade
Return



I must say that 8p - 2a are my best programming hours.

btw, if you have a food lion neer you, dr perkey and mountain loin are cheap, great tasting, and loaded with caffine and sugar!

Last edited by redbeard0531 : 26-01-2003 at 23:58.
  #15   Spotlight this post!  
Unread 27-01-2003, 00:00
Anthony Kesich's Avatar
Anthony Kesich Anthony Kesich is offline
Programmer Turned Engineer
AKA: SonKenshin
#1097 (Site 3 Engineernig)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Sacramento, CA
Posts: 186
Anthony Kesich has a spectacular aura aboutAnthony Kesich has a spectacular aura about
Send a message via AIM to Anthony Kesich
im both fearing and looking forward to the final weekend. WE have a 5 day weekend at my school that weekend cuz of combining holidays and teacher meetings, so either ill rock and programming and make something godly or i will go into a coma from lack of sleep (or food if i do progam too intensly )

-Anthony
__________________
C is screwing up my English--I'm ending all my sentences in semi-colons;

Horray for most things! -George Carlin

"Sure, I'll play rugby. Besides, I have a lot of experience running from really big guys who want to cream me." -Me, Freshman year
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling all PHP/ASP programmers! blueWarrior FIRST-related Organizations 15 27-01-2004 13:24
My hints and guess on the Game in 2004! Elgin Clock Rumor Mill 116 09-01-2004 13:30
The Grand FIRST team.. programmers and others needed randomperson Programming 0 31-05-2003 23:46
PIC Programmers seanwitte Electrical 8 18-04-2003 17:04
Hints @ Kickoff Broadcast Nate Smith General Forum 13 05-01-2002 10:14


All times are GMT -5. The time now is 02:46.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi