|
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 May 19 2016 00:58 Morfildur wrote:The joy of working with student programmers: foreach ($messages as $key => $message) { throw new \UserDB\Exception\AffiliateException($message); } I don't think that works as they think it works... I have to rewrite the whole code they wrote in the last two weeks in two days because it's pure trash that doesn't even do what the task I gave them required, despite me making diagrams on the whiteboard and explaining everything twice while showing the code parts that needed to be changed and added. Is this the infamous exception throwing gattling gun? Do they actually teach anything at school?
|
On May 19 2016 19:10 Keniji wrote:Show nested quote +On May 19 2016 00:58 Morfildur wrote:The joy of working with student programmers: foreach ($messages as $key => $message) { throw new \UserDB\Exception\AffiliateException($message); } I don't think that works as they think it works... I have to rewrite the whole code they wrote in the last two weeks in two days because it's pure trash that doesn't even do what the task I gave them required, despite me making diagrams on the whiteboard and explaining everything twice while showing the code parts that needed to be changed and added. So what did they try to do? Is $messages some array of collected errror messages?
They wanted to provide all the error messages that a validator collected in $messages. The same code segment appeared several times in the code.
There would have been a dozen better ways to go about it, e.g. a custom exception that accepts an array parameter, but they chose the one that would always only return the first message and discard the rest, which definitely isn't the correct way to go about it.
|
Hyrule18968 Posts
sometimes PHP is super dum
|
|
PHP is just complaining because of that horrible curly bracket positioning
|
Hyrule18968 Posts
On May 24 2016 02:13 Nesserev wrote: Did you just get 'greeked'? (replace a semicolon ; with a greek question mark ; in someone's code to troll them really hard) no, it was generated by symfony
On May 24 2016 02:15 solidbebe wrote: PHP is just complaining because of that horrible curly bracket positioning PSR-2 is demanding
|
Hey guys, this may or may not be homework related ... Ok, I actually have to translate a text about computer science, found here: http://www.stilldrinking.org/programming-sucks I am done, I just didn't get this reference at all and wondered if someone would care to shed some light
"Is that called arrayReverse?"
"s/camel/_/"
"Cool thanks."
Wasn't that guy helpful? With the camel? Doesn't that seem like an appropriate response?
Google to the rescue:
s/camel/_ means: search & replace CamelCase with an underscore.
Essentially the reply is that it's not called arrayReverse but array_reverse, which is helpful.
And yes, that's a very specific way to think.
|
Hyrule18968 Posts
he's correcting the function name.
A asks "is that [function] called arrayReverse()?" B responds "No, it's array_reverse()"
s/pattern/replace is a perl construct to do string replacements with regex. "camel" is this instance refers to the naming scheme of the function (camel case: arrayReverse), and is correcting A that it should be underscore style, where words are all lower case and separated by underscores.
pftt that's what I get for opening and reading this thread late
|
:< tofucake, thank you, my brain is so fried after today, I just didn't remember to use my googlefu first and when I remembered I didn't want to bother you guys with something a search could answer.
I appreciate that you took time to help me out!
|
|
Hyrule18968 Posts
yeah I learned it from perl, but now you've given me flashbacks to my college class about awk and sed and whatnot
|
|
lol i learned s// at a job. my coworkers would keep posting it in code reviews and i would be like ???, finally managed to talk to my mentor and he's like, haha yeah that's short for find&replace
you can use it in slack :o
heard of sed, never used
|
Man at my first internship we wrote functional tests in makefiles (we were working on back-end command line tools for a static analysis suite okay, it was actually way better than it sounds...), I had to learn sed (and grep, and a whole lot of other things) pretty quickly in those four months lol.
|
got a job as a ms dev working for the public sector. j2ee and .net. First programming job, trained as a chemical engineer.
How bad is it going to suck?
|
On May 27 2016 21:06 nnn_thekushmountains wrote: got a job as a ms dev working for the public sector. j2ee and .net. First programming job, trained as a chemical engineer.
How bad is it going to suck? Don't know about .NET, people here said that it was fun. And not just fun, good too. Except for the fact that it limits you to windows server.
How badly is Java gonna suck though? Well, on a scale of "It won't suck at all. In fact, this thing is just so much fun" to "Why the FUCK are people even using this shit?", Java can be literally anywhere.
1- Which java version are you going to use? 2- Which application server are you going to deploy to? 3- Which framework are you going to use? 4- Are you integrating with other JVM languages? Like Groovy? Kotlin? Scala? 5- Which IDE are you going to use? 6- Which build tool are you going to use? 7- Are you going to use Spring stuff? RxJava? 8- Which database are you going to use?
And the parameters go on and on and on like this.
|
Anyone have a hint on how to do this in python?
Got a bunch of nested lists like this: [[a,b,c,d],e,f,g,h,[i,[j,k,l]]]
Top level list, I need all of the list members. In the second level and above, I pick one out of the list and flatten. Generate all possible permutations.
Feels like this should be easy and I've done this before.
|
Note: this isn't a question about how to develop maphacks.
So, from what I've read so far, people say SC2 client knows everything about game and it's all in your memory, you just have to read it. Hence, what maphacks are said to do. Is this process called reverse engineering? How the heck do you read memory of an application you haven't developed? Is it called 'hooking'? How useful is it to learn as a regular software engineer or should I not bother?
|
|
Note, i'm pretty new to programming
Recently I started learning python because I thought the syntax is beautiful and it seems awesome to quickly write little scripts. Yesterday, I just wanted to write a small recursive function and learned about generators. Instant love.
Which lead to searching for java equivalents and researching streams (and lambdas). A quick 5 minute task turned into a several hour session (including watching a 3 hour long presentation) which has to be continued.
fucking rabbit holes.
|
|
|
|