|
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. |
On June 20 2017 20:26 Manit0u wrote: I must say that I was of the same opinion as you are some time ago (when I was switching from PHP to Ruby), but after a while of using the "no brackets and semicolons" language I must say that it's getting increasingly harder for me to go back (and I'll have to do that since I need to learn me some JEE).
Writing brackets and semicolons just seems like a real nuisance with very little benefit (the only benefit I see is when people write multiple statements per line, which is shit anyway and you can do that in Ruby using semicolons too if you want). It just feels like a needless syntactic sugar to guard against noobs writing code the wrong way. I believe that was the main reason for Python to abandon them (although I think they went a bit too far and I much prefer Ruby's "def ... end" syntax) and I have to agree. If you need all those brackets and semicolons to figure out where things start and end in your code then it's probably bad code to begin with.
As I said, it just feels over reals  The languages I currently encounter the most on a regular basis are java, python and C++ and after a long period of python I will feel a bit irritated by java/C++, but soon enough I get over my habit. Just like I get over the enforced noobfirendlyness of java when coming from C++. Sure you could argue that you have to type one less without brackets ( 1 bracket since every proper IDE and editor figures you want to close every bracket you open), but you could also say you don’t have to worry about alignment which is only needed for readability and can be added with only a shortcut in almost every IDE so I really can’t see a proper argument that.
The semicolon at the end of a line might actually be a bit redundant even though I don’t like the argument about multiline code since that isn’t the only case affected. The company where I was an intern last year had some conventions that demanded separating a line that way and while not liking it at first, I have to admit it really worked. Or I simply got used to it. At the moment I like the extra option it gives me, but I don’t feel like I can substantiate that with more than “I like it”. And the fact that GO occasionally gets me since it made ‘;’ obsolete by inserting it for you but that’s just another habit I need to break.
EDIT: I would also like as a show of good will propose the usage of 9 spaces and a tab as a compromise between tab vs 2 spaces vs 3 spaces vs 4 spaces
|
On June 20 2017 20:48 YourGoodFriend wrote:Just use tabs that save as spaces, to everyone but you you use spaces but to you you use tabs EZPZ The it becomes a 2 space vs 4 space argument and we all know 3 spaces is superior
Ofc I don't press space 4 times (which is obviously the correct amount of spaces for indentation) but instead have the IDE replace the tab with spaces.
|
Heh, a colleague of mine accidentally did "sudo init 0" on our partner's staging server (he wanted to shut down his comp but typed it in a wrong terminal). Was fun
|
|
On June 23 2017 02:02 Nesserev wrote:Show nested quote +On June 23 2017 00:30 Manit0u wrote:Heh, a colleague of mine accidentally did "sudo init 0" on our partner's staging server (he wanted to shut down his comp but typed it in a wrong terminal). Was fun  Fill me in... why would you ever use the command "sudo init 0" to shut down your computer, over any of the alternatives?
It shuts down instantly 
But really, I have no idea. I've never used it but he swears by it and it's a habit of his now.
|
|
Long image. High quality code. + Show Spoiler +
@Manit0u, you are the sole reason I still check the random Pic thread
|
It took me 6 back and forth in a code review to convince someone to refactor something similar (though not nearly as egregious as that).
Love me some internet season 
Actually on the other hand a lot of interns tend to be super crazy enthusiastic about learning things in code review, so that's refreshing.
|
On June 26 2017 00:16 phar wrote:It took me 6 back and forth in a code review to convince someone to refactor something similar (though not nearly as egregious as that). Love me some internet season  Actually on the other hand a lot of interns tend to be super crazy enthusiastic about learning things in code review, so that's refreshing.
I wonder how this will go for me. I've been assigned to train 6 practicants sometime soon. We'll pick the best of them for the intern positions because we can't find enough people to work with us. We have a very large pile of CVs but over the past 4 months, despite interviewing 7-10 people/week we took in 2 people.
|
On June 26 2017 00:53 Manit0u wrote:Show nested quote +On June 26 2017 00:16 phar wrote:It took me 6 back and forth in a code review to convince someone to refactor something similar (though not nearly as egregious as that). Love me some internet season  Actually on the other hand a lot of interns tend to be super crazy enthusiastic about learning things in code review, so that's refreshing. I wonder how this will go for me. I've been assigned to train 6 practicants sometime soon. We'll pick the best of them for the intern positions because we can't find enough people to work with us. We have a very large pile of CVs but over the past 4 months, despite interviewing 7-10 people/week we took in 2 people.
Having minions is great. Just show them your picture dumps and they'll worship you.
|
On June 26 2017 01:06 Blitzkrieg0 wrote:Show nested quote +On June 26 2017 00:53 Manit0u wrote:On June 26 2017 00:16 phar wrote:It took me 6 back and forth in a code review to convince someone to refactor something similar (though not nearly as egregious as that). Love me some internet season  Actually on the other hand a lot of interns tend to be super crazy enthusiastic about learning things in code review, so that's refreshing. I wonder how this will go for me. I've been assigned to train 6 practicants sometime soon. We'll pick the best of them for the intern positions because we can't find enough people to work with us. We have a very large pile of CVs but over the past 4 months, despite interviewing 7-10 people/week we took in 2 people. Having minions is great. Just show them your picture dumps and they'll worship you.
I don't need them to worship me. I need them to actually be competent enough to get hired and reduce my workload
|
28079 Posts
Maybe they will be too competent and snipe your job.
|
On June 26 2017 03:54 TheEmulator wrote: Maybe they will be too competent and snipe your job.
Most of them will have 0 to very little experience (and experience is super important) so I'm not worried about that. Anyway, after I train them I also have to teach our PHP boys and girls (current employees, including lead PHP dev) some Rails.
|
Maybe this question is a bit too advanced, but I'll ask anyway.
I read somewhere that when making an RTS game, it's a good idea to store the units in a binary tree of some sort. Or maybe it was to hash the units and have them in a hashset of some sort. And I just can't make sense of it.
I mean if I make any game, I'll be running a game loop, and iterating through each element and its update function exactly one time. So what advantage could it possibly bring to use any other structure than an array or a list for the units/terrain/building/doodads, etc?
|
It helps when figuring out what units are affected by aoe or hit or even visible.
|
|
Cool  I'm downloading the source code from his website right now! It always helps to see how other people implement stuff.
|
On June 26 2017 07:52 Hanh wrote: It helps when figuring out what units are affected by aoe or hit or even visible.
That's interesting. I never thought about AOE spells or visibility. Is it because you don't have to iterate through every object in the game to find what units are in an AOE when using a tree?
|
Yes, pathfinding also benefits from knowing neighbors quickly.
|
|
|
|
|