WHY
Printable View
WHY
Note about C++: debugging segmentation faults resulting from null pointers at four in the morning is no fun. No fun at all.
Yes, I just used my gallery thread as a pointless blog. Sue me. It'slateway too early, and I'm tired.
e: I'ma go ahead and post a pic before I go to bed.
I've been playing around with geometric constructions, and today I decided that since the number 7 is so awesome I should find a geometric construction for a regular heptagon. Turns out it's impossible, or so they say. I came up with something that's damn close, but if you look closely you can see that it's ultimately incorrect. I'm not giving up, tho. There must be a way...
http://www.spacebrick.net/pictures/b...roximation.jpg
ee: btw, that's slightly enhanced with photoshop, to exaggerate the lines, as my guidelines were quite light.
Geometric constructions were the only thing I really liked about Geometry class.
Okay now. I want to get some feedback on some code I wrote, but this means I'm going to have to actually post the code online. In the header of the code you will see a GPL summary type thing saying the code is available under the terms of the GPL, SO: this counts as an official release type thingy, and from this point forward my code can be taken and used and modified by anybody who pleases, yadda yadda yadda. Don't abuse it please, as the code is not done. (You'll see at the bottom of the header the three tasks that need to be completed in the file).
Aaaaanyway, here's the deal: I used some other open-source code elsewhere in my web framework, and I appreciated the level of commenting in it, and tried to duplicate that to make my code developer-friendly, but I think I went way overboard. Fully half of the file is consumed by comments and whitespace. Here's the thing, tho: the majority of the commenting comes in the form of annotations, which are really useful if your IDE looks for that sort of thing (so that you can look up access, parameters, and return types of functions without digging into the file yourself).
Still, when I look at that file, my first reaction is "Jesus Christ, this code is morbidly obese with unnecessary comments".
So what do you think? Should I leave in all the annotations that do no good for the developer looking at the file but help the developer that has included the file for use, or should I cut all that crap out to make the file easier to look at directly?
(lol, I almost posted this without linking the code. Here it is.)
e: lol, with the php extension, my host was interpreting the file and displaying the output, which in the case of this backbone framework file was nothing. I added a .txt extension to fix that.
ee: ok wiseguy, the site insisted on interpreting it if php was in there at all, so now it's just got a plain .txt extension. Just remember that it's supposed to be a .php file.
eee:
JESUS CHRIST. Ok, now I know I did this wrong. I think what I'm gonna do is replace all the annotations on member variables with single line comments describing their purpose.Code:newInputValidator.php (46.8 KB, actual: 41.6 KB)
-----------------------------------------------
Number of lines of code: 471
Number of directive lines: 0
Number of empty lines: 88
Number of comment lines: 560
Number of empty comment lines: 381
-------------------------------------------
Total number of lines: 1500
-----------------------------------------------
*doublepost*
*looks up* oh hey, I rewrote that file so now it's roughly 1200 lines, 550 of which are code. I'm happy with the way it is now, because it's self-documenting.
Anyway, I'm here to show something new:
see if you can guess what I'm working on. :-3
No, I'm not making animations, and yes, the geometry shown is very wtf. You'll see...
Oh I know what you're working on... heh heh heh!
mainly because you've told me, lol
*see heptagon post above*
I have a theory for how do geometrically construct a heptagon, but I can't seem to prove that it's correct. I have 6 pages of scribbled trig and algebra, and so far all I've managed to do is derive 3 trigonometric identities. ARG! How frustrating.
I had one equation that looked really promising- it was all in terms of alpha, which I'm trying to prove is equal to pi/7, but it simplified all the way down to
sin^2(alpha) +cos^2(alpha)=1. DAMMIT.
e: wtf, bbcode doesn't support subscript and superscript? >: (
Read up: http://mathworld.wolfram.com/Heptagon.html
(It is entirely impossible to construct a heptagon using pure Greek construction. But it's easy when you are given a fixed distance to copy off of)
That animation looks quite nice, keep it up!