• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 01:21
CEST 07:21
KST 14:21
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL19] Finals Recap: Standing Tall6HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Flash Announces Hiatus From ASL40Weekly Cups (June 23-29): Reynor in world title form?12FEL Cracov 2025 (July 27) - $8000 live event16Esports World Cup 2025 - Final Player Roster14Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
Statistics for vetoed/disliked maps The SCII GOAT: A statistical Evaluation Weekly Cups (June 23-29): Reynor in world title form? StarCraft Mass Recall: SC1 campaigns on SC2 thread How does the number of casters affect your enjoyment of esports?
Tourneys
RSL: Revival, a new crowdfunded tournament series [GSL 2025] Code S: Season 2 - Semi Finals & Finals $5,100+ SEL Season 2 Championship (SC: Evo) FEL Cracov 2025 (July 27) - $8000 live event HomeStory Cup 27 (June 27-29)
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
[ASL19] Finals Recap: Standing Tall Flash Announces Hiatus From ASL Help: rep cant save BGH Auto Balance -> http://bghmmr.eu/ Where did Hovz go?
Tourneys
[Megathread] Daily Proleagues [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET The Casual Games of the Week Thread [BSL20] ProLeague LB Final - Saturday 20:00 CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
Trading/Investing Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread The Games Industry And ATVI Stop Killing Games - European Citizens Initiative
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread Korean Music Discussion
Sports
2024 - 2025 Football Thread NBA General Discussion Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
Game Sound vs. Music: The Im…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 510 users

The Big Programming Thread - Page 730

Forum Index > General Forum
Post a Reply
Prev 1 728 729 730 731 732 1031 Next
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.
Djagulingu
Profile Blog Joined December 2010
Germany3605 Posts
May 19 2016 10:45 GMT
#14581
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?
"windows bash is a steaming heap of shit" tofucake
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
May 19 2016 10:55 GMT
#14582
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.
tofucake
Profile Blog Joined October 2009
Hyrule19029 Posts
Last Edited: 2016-05-23 16:45:19
May 23 2016 16:44 GMT
#14583
sometimes PHP is super dum

[image loading]
Liquipediaasante sana squash banana
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2016-05-23 17:14:18
May 23 2016 17:13 GMT
#14584
--- Nuked ---
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
May 23 2016 17:15 GMT
#14585
PHP is just complaining because of that horrible curly bracket positioning
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
tofucake
Profile Blog Joined October 2009
Hyrule19029 Posts
May 23 2016 17:18 GMT
#14586
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
Liquipediaasante sana squash banana
JWD[9]
Profile Blog Joined November 2015
364 Posts
Last Edited: 2016-05-26 19:38:35
May 26 2016 19:33 GMT
#14587
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.
tofucake
Profile Blog Joined October 2009
Hyrule19029 Posts
Last Edited: 2016-05-26 19:40:48
May 26 2016 19:40 GMT
#14588
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
Liquipediaasante sana squash banana
JWD[9]
Profile Blog Joined November 2015
364 Posts
May 26 2016 19:50 GMT
#14589
:< 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!
Ropid
Profile Joined March 2009
Germany3557 Posts
May 26 2016 20:25 GMT
#14590
When you mentioned s/// being perl code, I started wondering where it came from. It was for example in ed and sed UNIX tools from the 70s, so it's a bit older than perl. It seems to show up in even older stuff as well. Google found it here on page 33 in documentation from 1968: http://bitsavers.trailing-edge.com/pdf/sds/9xx/940/ucbProjectGenie/mcjones/R-15_QED.pdf
"My goal is to replace my soul with coffee and become immortal."
tofucake
Profile Blog Joined October 2009
Hyrule19029 Posts
May 26 2016 20:55 GMT
#14591
yeah I learned it from perl, but now you've given me flashbacks to my college class about awk and sed and whatnot
Liquipediaasante sana squash banana
Mr. Wiggles
Profile Blog Joined August 2010
Canada5894 Posts
May 27 2016 04:05 GMT
#14592
Wait, you guys don't use sed?

This is a pretty good intro: http://www.grymoire.com/Unix/Sed.html
you gotta dance
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2016-05-27 05:37:32
May 27 2016 05:33 GMT
#14593
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
There is no one like you in the universe.
Cyx.
Profile Joined November 2010
Canada806 Posts
Last Edited: 2016-05-27 06:40:37
May 27 2016 06:40 GMT
#14594
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.
nnn_thekushmountains
Profile Joined February 2016
1501 Posts
May 27 2016 12:06 GMT
#14595
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?
Djagulingu
Profile Blog Joined December 2010
Germany3605 Posts
Last Edited: 2016-05-27 17:41:29
May 27 2016 17:40 GMT
#14596
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.
"windows bash is a steaming heap of shit" tofucake
TanGeng
Profile Blog Joined January 2009
Sanya12364 Posts
Last Edited: 2016-05-28 18:17:49
May 28 2016 18:17 GMT
#14597
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.
Moderator我们是个踏实的赞助商模式俱乐部
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2016-05-29 02:06:36
May 29 2016 02:02 GMT
#14598
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?
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2016-05-29 06:57:36
May 29 2016 06:03 GMT
#14599
--- Nuked ---
Keniji
Profile Blog Joined April 2008
Netherlands2569 Posts
Last Edited: 2016-05-29 12:05:34
May 29 2016 12:01 GMT
#14600
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.





Prev 1 728 729 730 731 732 1031 Next
Please log in or register to reply.
Live Events Refresh
Next event in 4h 40m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 231
StarCraft: Brood War
PianO 391
Snow 103
Aegong 65
JulyZerg 61
Nal_rA 45
Rock 31
ajuk12(nOOB) 14
Noble 9
Icarus 7
Bale 6
Dota 2
NeuroSwarm116
League of Legends
JimRising 779
Counter-Strike
Stewie2K726
Super Smash Bros
Mew2King201
amsayoshi47
Heroes of the Storm
Khaldor98
Other Games
summit1g9128
shahzam719
hungrybox380
WinterStarcraft368
RuFF_SC266
Organizations
Other Games
gamesdonequick1007
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Berry_CruncH330
• practicex 48
• OhrlRock 3
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Rush1280
• Lourlo883
• Stunt388
Upcoming Events
The PondCast
4h 40m
RSL Revival
4h 40m
ByuN vs Classic
Clem vs Cham
WardiTV European League
10h 40m
Replay Cast
18h 40m
RSL Revival
1d 4h
herO vs SHIN
Reynor vs Cure
WardiTV European League
1d 10h
FEL
1d 10h
Korean StarCraft League
1d 21h
CranKy Ducklings
2 days
RSL Revival
2 days
[ Show More ]
FEL
2 days
Sparkling Tuna Cup
3 days
RSL Revival
3 days
FEL
3 days
BSL: ProLeague
3 days
Dewalt vs Bonyth
Replay Cast
4 days
Replay Cast
5 days
The PondCast
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-06-28
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025

Upcoming

CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.