« first day (943 days earlier)      last day (4374 days later) » 

01:30
I have to do a lot of looping through a "3d" array in javascript Array of Array of Array...
Really gotta improve my script, this stuff is a bit heavy in Javascript
 
5 hours later…
06:38
hi..
for (b2Body* b = world->GetBodyList(); b; b = b->GetNext())
{

if (b && b->GetUserData() != NULL) {
//Synchronize the AtlasSprites position and rotation with the corresponding body
CCSprite *myActor = (CCSprite*)b->GetUserData();
if(myActor.tag==4) {

destination = CGPointMake(b->GetPosition().x*PTM_RATIO, b->GetPosition().y*PTM_RATIO);
}

}
}
in this loop i had to free 'b' ?
or it's freed as its scope finishes?
there is no GC
07:07
no and no
pls reread the "pointers" chapter of whatever C++ book you have
 
4 hours later…
10:47
ffs .. Why isnt this working?
Even just a loop that is inside the socket connect doesnt work.. always logging NaN
@OliverSchöning maybe you should first initialize HP.hunde
How? Why? It gives the same error even if I do not push an array but just a single element: HP.hunde.push(ID) gives NaN
Could you explain?
@Chunk-e-Yamani
I'm not familiar with JS,
but I think you should write something like HP.hunde = []; in the first line
Hm.. but that would probably clear the existing objects inside it.. I think I gotta post a question about it.
11:03
I don't see any initialization code there
which leads me to thinking that there might be more code somewhere dealing with that object
that'd mean the bug is somewhere else
But:
HP.hunde.push(myID);
Gives NaN. Is that normal? Or some error somewhere?
Ok, mb I found the error
if myID is NaN, yes
@snake5 Yes, was one of my typical errors. It's hard to assign a value to a NaN variable.
Still.. this is hard if I am not sure about every part of the syntax and quirks
programming is hard
there is no way that could ever be changed
I read on coding horror at some point that after 4-5 years you dont get better, your style and attitude towards programming. Makes me a bit anxious because there is SO MUCH to learn for me
coding horror = a blog
11:12
I'm at the "after 4-5 years" stage and I still find new things to learn
so it can't be true
I remember something similar but about 10000 hours - some say it's the time it takes for someone to become proficient at any task.
I should rephrase it. You do not become a "better" programmer at that point I think it says. If you are a sloppy code monkey, you stay one. Bill gates or similar was quoted on that too.
Brains - learn from mistakes, repeat. We arent computers ^^*
I'd like to see the source :P
yeah, that's not what it says
enlighten me. The quote seems to say you get put into your box after a few years. Like an athlete.
11:18
it's not that good programmers do not become better, it's that bad programmers don't suddenly become good after that time
Yeah :) But I am pretty sure I am a bad programmer. So that is stressing me slightly
and keep in mind that it's just a generalization - all sorts of things are just ignored
most importantly, the time spent on programming
good programmers spend a lot of time on it from the very beginning, it becomes their lifestyle
bad programmers spend most of their free time on other things, it's what they're used to doing and will most likely never change
I think interest is more important then overall time spent on it. (Although you obviously spent more time if you are interested* But I can't achive anything besides those things I have interest in
yeah, interest determines the amount of time you spend
Sigh.. doesnt help that I appear to get dumber :) It's fun though. I finally stopped wanting to programm and actually started on a project. And I have learned quite a bit this way that I hadnt in some months just reading some articles once in a while.
 
6 hours later…
17:16
Why does dream spark have vs 2008 and vs 2012 but not vs 2010 :/
gamedev.stackexchange.com/questions/50476/… - first he's clueless and then he answers his own question or something? :D
@ClassicThunder what's wrong with Express?
It can't run plugins
I like my having resharper and a spellchecker
spellchecker? 0.o
Yeah, you don't have one?
17:24
and having tried code refucktoring tools before, I'd say I wouldn't touch them with a 10-foot pole
@JohnMcDonald no and I disable any that I see ASAP
spellcheckers are dumb
So are computers
quite literally so
exactly
can't trust computers to do a man's job
yeah refactoring tools such I like resharper for the navigation tools and error checking
if I want to name a variable one way, I don't want any damn computer telling me it's the "wrong" way
you can program in what the right way to name variables
just helps you stay consistent
17:27
@ClassicThunder if I want to name my variable "qufsc", I will do just that
I don't need any tool telling me that it's grammatically incorrect or something
I'm aware of that myself
I wrote it :D
It only spell-checks comments
and strings
anyways the code navigation features alone makes resharper worth it to me VS lags behind worth IntelliJ and Eclispe in that regard
still kind of dumb
if I want to reference my "qufsc" in a comment, I'd be out of luck
so you'd rather make alot of spelling mistakes?
@JohnMcDonald surprisingly I haven't made any
17:29
actually it adds all variables to the dictionary
so kinda smart :D
the "surprisingly" part was somewhat sarcastic, btw
Doesn't mean you can't purposely make a misspelling
@ClassicThunder what if "qufsc" is an abbreviation for some item name and I want a lot of qufsces?
Add it to the dictionary
not sure never tried that
17:30
or the "Abbreviation List"
@JohnMcDonald why the hell would I ever want to do that?
it's not a word
most of my variable names actually make snense though
and I'm not here to manage my own dictionary or something
@snake5 They why use it?
I write code, that's what I get paid to do
17:31
no need to abbreviate things with auto complete
Come up with a real scenario
@JohnMcDonald I don't
just write out the name
@JohnMcDonald it's quite real, just usually less extreme
tools don't care
@ClassicThunder not interested
lol not trying to sell you anything
17:32
You can't say "What about this madeup word?" then say that it's not something you'd add to a dictionary or abbreviation list. If it's not one of those, then why are you using it?
I make things shorter because they're a pain in the fingers to type otherwise
@JohnMcDonald what I meant is that I don't want to manage my own dictionary or some crap like that
pretty sure it takes about 5 letters + tab to write something about 60 characters long
Then why are you arguing. You're just going to disable the useful feature anyway
@ClassicThunder way to go to make code unreadable
lol abbreviations are more readable then writing the words out
k
17:34
@JohnMcDonald I'm saying that spellchecker is useless and takes more time to use than it saves
@snake5 He's talking about dot complete
@JohnMcDonald I'm talking about his "60 character variable names"
doesn't make sense to use such
I disagree, and I'd rather have my spelling checked than look like a moron
@snake5 Why not?
the point is you type any variable already in existence in about 5 button presses
regardless of that words lenght
so abbreviations are pointless
@JohnMcDonald because it takes more time to write, it adds noise to code, takes up valuable screen space, requires split expressions etc.
@ClassicThunder apparently I forgot who I'm arguing with
17:36
More time to write, no, but more time to read, sure. Screen space, sure
But clearer
to who?
To everyone?
not really
verbose names are same as comments - they can easily get outdated and misleading
Current developers won't have an issue, but leave it 6 months and even the current developers (you) will forget what "qufsc" means
haven't had that issue
17:38
That's because you're young
@snake5 how is that argument specific to verbose names?
QueueForSellingCoffee is easier than qufsc every day
@JohnMcDonald what if it stops being a queue?
Then you REFACTOR
:D
Bam
rename it and then hit a button that changes it for every occurrence
17:40
spending time on things that don't matter, nice :P
such a button exists in every ide I have used
it's much easier to associate more abstract things do data in mind
don't have to remap any time something changes
To rename takes seconds, but to change how it's used will take time no matter what you do
What we're all forgetting, here, is that snake writes perfect code every time, so there's no need to refactor. Ever.
7
Spending time to maintain code clarity doesn't matter? Have you worked on a large scale project with dozens of people? Its probably the single most important thing. All of your arguments ignore the importance of maintainability.
17:41
@TreDubZedd Oh yeah
@TreDubZedd heh, I didn't know that :D
That's because nobody has ever told you....
because you don't.
@ClassicThunder iirc, snake is ~22. So no
So am I :/
Cooped though so learned a ton there/
22 and arrogant (and unteachable) is different than 22 and willing to learn.
17:43
@ClassicThunder And you can honestly answer "yes"?
@ClassicThunder Ah, interesting
@ClassicThunder yes, I have
and the API matters, which is the part that I write really carefully
making names for variables before ironing out their usage patterns is like picking design patterns and writing code from them
"No battle plan survives contact with the enemy" - Colin Powell
but, it's better to have a plan. You should still anticipate change though
who's talking about a plan?
7 mins ago, by snake5
making names for variables before ironing out their usage patterns is like picking design patterns and writing code from them
ah, that
yeah
well, I do have plans
17:54
I name variables. Then if the names don't fit usage, I use "Refactor..."
but I do anticipate change as much as possible
the way I make variable names is one part of that
@Almo exactly
ok back to the iOS project gotta fix up the color-select menu
18:22
I like short-ish variable names for locals
it's easier to read for me when there's less letters or something. The shape of the code stands out more.
18:41
@Jimmy that was one of my arguments, which apparently was skipped :P
not in the same words but yeah, easier to skim code
19:00
how do i calculate a normal for a vertex of a triangle?
just one triangle?
cross product of two of the vectors that make the triangle
that should give you the normal of the triangle face
if you want the normal of a vertex
you need to get the average of the normals for all triangles it is part of
i want to set normals for each vertex of a generated surface
okay, well you are going to need to calculate the normals for all faces on the surface, then use those values on the vertices they apply to.
19:05
okay
so i just pick two vertices of a triangle, make a cross product of theyr position, and i get the normal of the triangle?
to summarize:
Nx = UyVz - UzVy
Ny = UzVx - UxVz
Nz = UxVy - UyVx
where U = triangle point 2 - triangle point 1 and V = triangle point 3 - triangle point 1
@visDEVion two edge direction vectors
lol I'm trying to write a email to a company telling them that I really like their offer but need 2 weeks to make a decisions to follow up with other opportunities.
And it keeps sounding like a break up letter when I read it in my head.
I suck at this.
they all sound that way. Just make sure they know you want to stay friends
Just trying to get away from the tone of "your awesome but..."
19:13
@ClassicThunder yeah, that'd sound like "f**k off" to me :P
well, tell them that it's not them, it's you
what I'd write instead is "at this point I cannot give a definite answer" or something like that
@BenjaminDangerJohnson that's what all break up letters look like :D
that's pretty much what a defferal letter is
anyway, I'd also add something along the lines of "it'd be cool if you can wait until I decide but I will understand if you can't"
people like respect
I've told employers I needed time to decide
19:16
but yeah, more seriously, you can just tell them that you are still in the interview process at a few other companies and that you would like to take some time to finish the interview process with them.
if they're pressuring you then there's a problem
sometimes even more so than friendliness
yeah
I'm also pretty sure it won't be the first time they get an answer like that
2 weeks should be reasonable
what is the company?
yeah 2 weeks is right when I should be finishing up with the other companies
19:41
Thanks guys I think I managed to write it where the needing to hold of a bit doesn't have the tone of a reservation but that of a nessesity
Yay for job offers though :D
Thanks the summer internship hunt is actually going pretty well. People must like the coop experience because my grades are pretty average.
I think internships / coops are great for companies. Try out a student as an "employee" at a reduced rate. If it turns out they are a good mesh for the company it can turn into full time employment. Win for both parties
If it turns out to not have been a good fit for the company then they part ways. Student got experience and the company got work at a reduced rate. Win for both parties
I agree and time at my first coop taught me way more practical skills than my 4 years of university have. Working closely with people who are 20+ year veterans on an actual product is infinitely more informative than throwing shit together for a class.
19:59
I wish I could actually get on some projects with bigger teams. Doing it by myself mostly just confirms that I'm doing it good enough and not helping me get better necessarily.
Sure I can get wiser to what worked and what didn't for a project and where I can improve. But yeah...
I feel the same way right now
Time to start the Lonely Coders Club.
look
varying vec4 varyingColor;
varying vec3 varyingNormal;
varying vec4 varyingVertex;

void main() {
	vec3 vertexPosition = (gl_ModelViewMatrix * varyingVertex).xyz;
	vec3 surfaceNormal = normalize((gl_NormalMatrix * varyingNormal).xyz);
    vec3 lightDirection = normalize(gl_LightSource[0].position.xyz - vertexPosition);
    float diffuseLightIntensity = max(0, dot(surfaceNormal, lightDirection));
    gl_FragColor.rgb = diffuseLightIntensity * varyingColour.rgb;
    gl_FragColor += gl_LightModel.ambient;
this is a shader fragment program for opengl per pixel lighting
i'm new to this stuff
how can i change the lighting radius?
20:20
Actually I'm not sure what you mean by radius. How far the light can effect objects?
I think the float fspecular = pow(specular, gl_FrontMaterial.shininess); line is where you want to focus.
there's also no distance falloff that I can tell
you could scale the diffuseLightIntensity by 1/(distance-to-light), for example. Or, if you are gamma-correct, 1/(distance-to-light)^2
@ClassicThunder yes
@TreDubZedd that for specular lighting, i want to change the radius of diffuse
I wasn't aware diffuse lighting had a radius
maybe I'm thinking ambient
It looks like it's (supposed to be) directly related to the "diffuse reflectance" of the material
so...change the reflectance, change the radius.
I swear windows 8 is basically windows 7 with the most retarded start button ever.
20:36
Windows Key + Typing == the only start button I need. Working as needed since Windows Vista. Still works great in Windows 8
For some reason never bother to learn short cuts for windows. Know a whole lot of them for Linux (which I rarely use) but not the OS I use every day.
In Windows Vista and Windows 7 there is a big ol textbox in plain view in the start menu. Not much of a hidden shortcut ;)
A little more hidden in 8 (you have to start typing for it to appear) but yeah
And I don't know about you, but I don't carefully aim my mouse in the middle of the start button. I just force my mouse into the corner. So the hidden location has not impaired my ability to press the button at all
20:53
Oh yeah the the search bar. I took the + to mean at the same time so holding the windows key and pressing a hot key.
Like I know windows + Q jumps to search apps. But that is the only one I have memorized.
heh, Win+Q brings up Lync for me
Win+E and Win+R are the two I use most frequently
and Win+L
Explorer, Run, and Lock respectively
Win+R (this is quickly dying for me), Win+L and Win+D would be my top 3
Win+E is getting there though
I never use my desktop
I tend to get lost in windows (Don't ask because I have no clue) so Win+D is my panic "hide all the things" button
Win+D is also the magic "ew ew ew ew metro" shortcut :)
21:02
hah
21:14
@melak47 I'll admit I'm guilty of that once in a while
Alt+Shift+Esc I have discovered does the same thing and ONLY minimizes metro instead of all the things
Thats a lot of keys though
I use ctrl-shift-esc all too often...
...turns out the software I'm helping to develop isn't what you'd call "stable"
Oh yeah thats a good one too
I usually do it for performance monitoring reasons though
Ah, right...yes... that's what I use it for...
 
2 hours later…
23:37
Bah, I'm trying to find an article posted here a while back. Something along the lines of a designer added a duck to this princess animation because he knew that his super needed to feel important by being critical
I read that. but I can't remember where :/
It's not called rubber ducking or duck typing, but there's a name for it, right?
A decoy
Man, we mention "duck" a lot in here
"not for ducks, they have webbed feet"
"ducks don't use power lines"
"ducks are smart :) "
"Mmm, stuffed duck. Tasty. "
"Round, orange-y pink duck. "
"I wish I had a duck. :) "
43 pages of that
23:56
I see it on the QA sites somewhat frequently
maybe programmers.SE?
don't know if it was in chat
That was Battle Chess with the duck
put the duck into the queen's anim
but in a way easy to remove
gave his producer the thing to say "it's great but get rid of the duck" so they could have it exactly the way they wanted it
they knew the prod would try to change at least one thing

« first day (943 days earlier)      last day (4374 days later) »