ninjette.org

Go Back   ninjette.org > General > Off-Topic

Reply
 
Thread Tools
Old April 27th, 2009, 03:35 PM   #1
Alex
ninjette.org dude
 
Alex's Avatar
 
Name: 1 guess :-)
Location: SF Bay Area
Join Date: Jun 2008

Motorcycle(s): '13 Ninja 300 (white, the fastest color!), '13 R1200RT, '14 CRF250L, '12 TT-R125LE

Posts: Too much.
Blog Entries: 7
Best embedded code comment on record

original link

The comment is about a quarter of the way down. Here's an excerpt:

Quote:
// At this point, I'd like to take a moment to speak to you about the Adobe PSD format.
// PSD is not a good format. PSD is not even a bad format. Calling it such would be an
// insult to other bad formats, such as PCX or JPEG. No, PSD is an abysmal format. Having
// worked on this code for several weeks now, my hate for PSD has grown to a raging fire
// that burns with the fierce passion of a million suns.
// If there are two different ways of doing something, PSD will do both, in different
// places. It will then make up three more ways no sane human would think of, and do those
// too. PSD makes inconsistency an art form. Why, for instance, did it suddenly decide
// that *these* particular chunks should be aligned to four bytes, and that this alignement
// should *not* be included in the size? Other chunks in other places are either unaligned,
// or aligned with the alignment included in the size. Here, though, it is not included.
// Either one of these three behaviours would be fine. A sane format would pick one. PSD,
// of course, uses all three, and more.
// Trying to get data out of a PSD file is like trying to find something in the attic of
// your eccentric old uncle who died in a freak freshwater shark attack on his 58th
// birthday. That last detail may not be important for the purposes of the simile, but
// at this point I am spending a lot of time imagining amusing fates for the people
// responsible for this Rube Goldberg of a file format.
// Earlier, I tried to get a hold of the latest specs for the PSD file format. To do this,
// I had to apply to them for permission to apply to them to have them consider sending
// me this sacred tome. This would have involved faxing them a copy of some document or
// other, probably signed in blood. I can only imagine that they make this process so
// difficult because they are intensely ashamed of having created this abomination. I
// was naturally not gullible enough to go through with this procedure, but if I had done
// so, I would have printed out every single page of the spec, and set them all on fire.
// Were it within my power, I would gather every single copy of those specs, and launch
// them on a spaceship directly into the sun.
//
// PSD is not my favourite file format.
__________________________________________________
Montgomery Street Motorcycle Club / cal24.com / crf250l.org / ninjette.org

ninjette.org Terms of Service

Shopping for motorcycle parts or equipment? Come here first.

The friendliest Ninja 250R/300/400 forum on the internet! (especially Unregistered)
Alex is offline   Reply With Quote




Old April 27th, 2009, 04:12 PM   #2
xTKx
Finally!
 
xTKx's Avatar
 
Name: Tony
Location: Central TX
Join Date: Jan 2009

Motorcycle(s): 09 Red 250R

Posts: 420
Blog Entries: 4
LOL! I'm gonna be honest here, I have no idea what PSD is, but his rant was stinkin hilarious!
__________________________________________________
-2009 Red Ninja 250R-
Intuitive frame sliders, comp werkes fender eliminator ...
xTKx is offline   Reply With Quote


Old April 27th, 2009, 04:23 PM   #3
Techno250
bikeless n00b
 
Techno250's Avatar
 
Name: Woody
Location: Newnan, GA
Join Date: Apr 2009

Motorcycle(s): None yet. My dream machine is a BLUE 250R.

Posts: 91
Hmmm....

*notes that Alex is in the Bay Area*

Why were you looking at this code anyway, Alex?



(BTW, PSD is Adobe Photoshop's native image file format.)
Techno250 is offline   Reply With Quote


Old April 27th, 2009, 04:43 PM   #4
Alex
ninjette.org dude
 
Alex's Avatar
 
Name: 1 guess :-)
Location: SF Bay Area
Join Date: Jun 2008

Motorcycle(s): '13 Ninja 300 (white, the fastest color!), '13 R1200RT, '14 CRF250L, '12 TT-R125LE

Posts: Too much.
Blog Entries: 7
It was linked on fark.com.
__________________________________________________
Montgomery Street Motorcycle Club / cal24.com / crf250l.org / ninjette.org

ninjette.org Terms of Service

Shopping for motorcycle parts or equipment? Come here first.

The friendliest Ninja 250R/300/400 forum on the internet! (especially Unregistered)
Alex is offline   Reply With Quote


Old April 27th, 2009, 04:48 PM   #5
KnoxNinja
BRKDWN.
 
KnoxNinja's Avatar
 
Name: Jimi
Location: Knoxville, TN
Join Date: Dec 2008

Motorcycle(s): 89 GPX250R, 89 GPZ500S

Posts: 126
PSD is the layered photoshop image format made by Adobe, is it not?
KnoxNinja is offline   Reply With Quote


Old April 27th, 2009, 05:11 PM   #6
Techno250
bikeless n00b
 
Techno250's Avatar
 
Name: Woody
Location: Newnan, GA
Join Date: Apr 2009

Motorcycle(s): None yet. My dream machine is a BLUE 250R.

Posts: 91
Quote:
Originally Posted by Alex View Post
It was linked on fark.com.
K, just wondering...
Techno250 is offline   Reply With Quote


Old April 27th, 2009, 05:39 PM   #7
Snake
ninjette.org certified postwhore
 
Snake's Avatar
 
Name: Rick
Location: Alexandria, Louisiana
Join Date: Jan 2009

Motorcycle(s): 05 Blue Ninja 250

Posts: Too much.
MOTY - 2017, MOTM - Jan '19, Oct '16, May '14
HHHHMMMM?????
All that computer talk is Greek to me.
Snake is offline   Reply With Quote


Old April 28th, 2009, 07:38 AM   #8
xTKx
Finally!
 
xTKx's Avatar
 
Name: Tony
Location: Central TX
Join Date: Jan 2009

Motorcycle(s): 09 Red 250R

Posts: 420
Blog Entries: 4
Quote:
Originally Posted by Techno250 View Post
(BTW, PSD is Adobe Photoshop's native image file format.)
Quote:
Originally Posted by KnoxNinja View Post
PSD is the layered photoshop image format made by Adobe, is it not?
Thanks ya'll!
__________________________________________________
-2009 Red Ninja 250R-
Intuitive frame sliders, comp werkes fender eliminator ...
xTKx is offline   Reply With Quote


Old April 30th, 2009, 08:17 AM   #9
NJD022588
============
 
NJD022588's Avatar
 
Name: Nick
Location: Occoquan, VA
Join Date: Nov 2008

Motorcycle(s): '09 Ninja 250R

Posts: 518
lol, thats great!

When you finally finish a project at 3am only to realize you have to back through all your code to comment it, you come up with some ridiculous comments.
NJD022588 is offline   Reply With Quote


Old April 30th, 2009, 11:33 AM   #10
Techno250
bikeless n00b
 
Techno250's Avatar
 
Name: Woody
Location: Newnan, GA
Join Date: Apr 2009

Motorcycle(s): None yet. My dream machine is a BLUE 250R.

Posts: 91
Wow Nick! That sounds like a comment from experience. Even though the profs in college always said comment as you go, I always commented code afterwards. It seemed to break me out of the coding groove to stop and write something in english!
Techno250 is offline   Reply With Quote


Old April 30th, 2009, 04:47 PM   #11
NJD022588
============
 
NJD022588's Avatar
 
Name: Nick
Location: Occoquan, VA
Join Date: Nov 2008

Motorcycle(s): '09 Ninja 250R

Posts: 518
It is from experience

I cant wait to be done with coding
NJD022588 is offline   Reply With Quote


Old April 30th, 2009, 05:50 PM   #12
Bsmith
ninjette.org member
 
Bsmith's Avatar
 
Name: Bill
Location: Easley, SC
Join Date: Jan 2009

Motorcycle(s): '08 Ninja 250 R.I.P.

Posts: 84
I don't know. I've read some weird code comments. Written a few as well. But hey I'm an old timer so that doesn't count. I QUIT writing code in 2001 or there abouts. I actually started on an old CP/M-80 NCR machine. Wow I feel old.
Bsmith is offline   Reply With Quote


Old May 7th, 2009, 09:54 AM   #13
Techno250
bikeless n00b
 
Techno250's Avatar
 
Name: Woody
Location: Newnan, GA
Join Date: Apr 2009

Motorcycle(s): None yet. My dream machine is a BLUE 250R.

Posts: 91
CP/M FTW!!!

I was coding (and commenting) COBOL in college. We were at the tail end of the COBOL era. Almost all of my college friends got jobs at banks or insurance companies. Also did a lot of IBM System 370 Assembler. Pascal was "cutting edge" then. One of my projects was on one of those crazy 4th generation "object oriented" languages! LOL!

Right now I'm goofing around with Ruby (and Rails) at work. Ruby has got to be one of the most elegant languages I've ever worked with.
__________________________________________________
>> fastest=[["green",510],["blue",475],["red",650]].sort{|a,b| a[1]<=>b[1]}[0][0].upcase;fastest
=> "BLUE"
Techno250 is offline   Reply With Quote


Old April 4th, 2013, 12:44 PM   #14
Alex
ninjette.org dude
 
Alex's Avatar
 
Name: 1 guess :-)
Location: SF Bay Area
Join Date: Jun 2008

Motorcycle(s): '13 Ninja 300 (white, the fastest color!), '13 R1200RT, '14 CRF250L, '12 TT-R125LE

Posts: Too much.
Blog Entries: 7
Necrobump. This made me laugh today. Maybe it will make someone else laugh too.
__________________________________________________
Montgomery Street Motorcycle Club / cal24.com / crf250l.org / ninjette.org

ninjette.org Terms of Service

Shopping for motorcycle parts or equipment? Come here first.

The friendliest Ninja 250R/300/400 forum on the internet! (especially Unregistered)
Alex is offline   Reply With Quote


Old April 4th, 2013, 01:34 PM   #15
alex.s
wat
 
alex.s's Avatar
 
Name: wat
Location: tustin/long beach
Join Date: Sep 2009

Motorcycle(s): wat

Posts: Too much.
Blog Entries: 5
MOTM - Oct '12, Feb '14
i laughed at his memory alignment troubles. psd isnt that bad. not compared to some of the **** i've seen. on ps2, you had to program shaders in this arcane cluster**** known as VU2, which was assembler code, but two simultaneous streams of it side by side. and you had to know exactly how long everything was taking and keep the two streams of assembler in sync with each other. (each side of the assembler got ran on a different processor basically) if something got slightly out of sync, the entire system would crash and spit out a bunch of garbage without really telling you anything about why, where, or how it crashed. basically you had to have a working simulation of the ****ing thing in your head before you could ever hope to get it out in code.
__________________________________________________
alex.s is offline   Reply With Quote


Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Critique My Riding (Video Embedded) jeffb502 Riding Skills 47 April 23rd, 2014 03:28 PM
Embedded Computer Display System linkinpark9812 2008 - 2012 Ninja 250R Farkles 23 April 11th, 2014 06:55 PM
YouTube Embedded videos NevadaWolf Help 2 June 23rd, 2013 12:17 AM
comment on opening picture Lychee Forum Information 4 September 27th, 2012 12:17 PM
[sportrider - features] - Keith Code California Superbike School - Cracking The Code Ninjette Newsbot Motorcycling News 0 September 20th, 2010 05:40 PM



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Motorcycle Safety Foundation

All times are GMT -7. The time now is 03:37 PM.


Website uptime monitoring Host-tracker.com
Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Except where otherwise noted, all site contents are © Copyright 2022 ninjette.org, All rights reserved.