• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 07:49
CEST 13:49
KST 20:49
  • 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
Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection7Code S Season 2 (2026) - RO8 Preview5[ASL21] Finals Preview: Two Legacies21
Community News
Douyu Cup 2026: $20,000 Legends Event (June 26-28)8[BSL22] Non-Korean Championship from 13 to 28 June4Weekly Cups (May 25-31): Clem doubles, 2v2 circuit heads toward finale0StarCraft II 5.0.16 PTR Patch Notes may 26th156Weekly Cups (May 18-24): MaxPax wins doubles0
StarCraft 2
General
TL Poll: How do you feel about the 5.0.16 PTR balance changes? RSL S6 finale at Blizzcon Oliveira Would Have Returned If EWC Continued Team Liquid Map Contest #22: Results and Winners High level ptr replays? where can I find them?
Tourneys
Douyu Cup 2026: $20,000 Legends Event (June 26-28) Maestros of The Game 2 announcement and schedule ! Sparkling Tuna Cup - Weekly Open Tournament Sea Duckling Open (Global, Bronze-Diamond) GSL Code S Season 2 (2026)
Strategy
[G] Having the right mentality to improve
Custom Maps
[D]RTS in all its shapes and glory <3
External Content
Mutation # 530 One For All The PondCast: SC2 News & Results Mutation # 529 Opportunities Unleashed Mutation # 528 Infection Detected
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ Where is EffOrt? BW General Discussion vespene.gg — BW replays in browser Quality of life changes in BW that you will like ?
Tourneys
[Megathread] Daily Proleagues [ASL21] Grand Finals [BSL22] Grand Finals - Sunday 21:00 CEST Escore Tournament StarCraft Season 2
Strategy
Creating a full chart of Zerg builds Relatively freeroll strategies Why doesn't anyone use restoration? Any training maps people recommend?
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Nintendo Switch Thread PC Games Sales Thread ZeroSpace Megathread
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread UK Politics Mega-thread Canadian Politics Mega-thread Trading/Investing Thread
Fan Clubs
The HerO Fan Club! The herO Fan Club!
Media & Entertainment
Movie Discussion! [Req][Books] Good Fantasy/SciFi books [TV/BOOK] *SPOILERS* Game of Thrones Discussion [Manga] One Piece
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Facing Challenges in Mobile App Development
TL Community
The Automated Ban List
Blogs
Does Workplace Frustration D…
TrAiDoS
An Exploration of th…
waywardstrategy
I'm an arrogant trash talke…
FlaShFTW
Gauntlet SC2: A Retrospectiv…
Ctone23
Why RTS gamers make better f…
gosubay
Customize Sidebar...

Website Feedback

Closed Threads



Active: 9578 users

The Big Programming Thread - Page 730

Forum Index > General Forum
Post a Reply
Prev 1 728 729 730 731 732 1032 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
Hyrule19221 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
Hyrule19221 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
Hyrule19221 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
Hyrule19221 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 1032 Next
Please log in or register to reply.
Live Events Refresh
Wardi Open
11:00
#91
IntoTheiNu 1151
WardiTV646
Rex110
Ryung 69
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Rex 100
Ryung 69
StarCraft: Brood War
Shuttle 4262
Sea 1477
Zeus 1221
Horang2 1219
Mini 745
Soma 296
EffOrt 222
actioN 207
Light 178
Soulkey 161
[ Show more ]
Pusan 120
ToSsGirL 105
Rush 102
Free 96
ggaemo 91
Hyun 50
[sc1f]eonzerg 45
hero 38
Shine 34
Sea.KH 30
Sacsri 29
sorry 28
Noble 28
HiyA 27
soO 22
yabsab 19
Icarus 15
Bale 13
Barracks 12
GoRush 12
ajuk12(nOOB) 8
zelot 8
Dota 2
Dendi883
XaKoH 504
XcaliburYe284
Counter-Strike
shoxiejesuss1222
olofmeister460
byalli397
Super Smash Bros
Mew2King117
Other Games
Trikslyr1298
Lowko484
Happy274
Sick271
Pyrionflax197
B2W.Neo17
MindelVK5
amsayoshi3
Organizations
Dota 2
PGL Dota 2 - Secondary Stream3503
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 12 non-featured ]
StarCraft 2
• iHatsuTV 8
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 6
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Upcoming Events
Monday Night Weeklies
4h 11m
OSC
12h 11m
Replay Cast
1d 21h
The PondCast
2 days
Replay Cast
3 days
OSC
3 days
CranKy Ducklings
3 days
BSL22 NKC (BSL vs China)
5 days
XuanXuan vs Jaystar
Mihu vs Messiah
eOnzErG vs Dewalt
Bonyth vs Jaystar
TerrOr vs Messiah
XuanXuan vs Mihu
eOnzErG vs Jaystar
Patches Events
6 days
BSL22 NKC (BSL vs China)
6 days
Dewalt vs Messiah
Bonyth vs Mihu
TerrOr vs XuanXuan
eOnzErG vs Messiah
Jaystar vs Mihu
Dewalt vs XuanXuan
Bonyth vs TerrOr
[ Show More ]
WardiTV Weekly
6 days
Liquipedia Results

Completed

Acropolis #4 - GSB
uThermal 2v2 2026 Main Event
Heroes Pulsing #1

Ongoing

IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
CSCL: Masked Kings S4
YSL S3
BSL 22 Non-Korean Championship
SCTL 2026 Spring
Maestros of the Game 2
WardiTV Spring 2026
Murky Cup 2026
Heroes Pulsing #2
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1

Upcoming

CSLAN 4
Blizzard Classic Cup 2026
Kung Fu Cup 2026 Grand Finals
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
HSC XXIX
Douyu Cup 2026
BCC 2026
Heroes Pulsing #3
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
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 © 2026 TLnet. All Rights Reserved.