• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 22:38
CET 04:38
KST 12:38
  • 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
Behind the Blue - Team Liquid History Book15Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8herO wins SC2 All-Star Invitational14
Community News
ACS replaced by "ASL Season Open" - Starts 21/0220LiuLi Cup: 2025 Grand Finals (Feb 10-16)26Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2Nexon's StarCraft game could be FPS, led by UMS maker10PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar)14
StarCraft 2
General
How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? Nexon's StarCraft game could be FPS, led by UMS maker Terran Scanner Sweep Behind the Blue - Team Liquid History Book Weekly Cups (Jan 12-18): herO, MaxPax, Solar win
Tourneys
PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) LiuLi Cup: 2025 Grand Finals (Feb 10-16) RSL Season 4 announced for March-April RSL Revival: Season 4 Korea Qualifier (Feb 14) Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
Map Editor closed ? [A] Starcraft Sound Mod
External Content
The PondCast: SC2 News & Results Mutation # 512 Overclocked Mutation # 511 Temple of Rebirth Mutation # 510 Safety Violation
Brood War
General
Which units you wish saw more use in the game? ACS replaced by "ASL Season Open" - Starts 21/02 StarCraft player reflex TE scores [ASL21] Potential Map Candidates Gypsy to Korea
Tourneys
[Megathread] Daily Proleagues Escore Tournament StarCraft Season 1 Small VOD Thread 2.0 KCM Race Survival 2026 Season 1
Strategy
Fighting Spirit mining rates Zealot bombing is no longer popular? Simple Questions, Simple Answers Current Meta
Other Games
General Games
Path of Exile Nintendo Switch Thread Diablo 2 thread Battle Aces/David Kim RTS Megathread ZeroSpace Megathread
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia
Community
General
US Politics Mega-thread Ask and answer stupid questions here! European Politico-economics QA Mega-thread The Games Industry And ATVI Russo-Ukrainian War Thread
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
ADHD And Gaming Addiction…
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
How do archons sleep?
8882
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2209 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
Hyrule19192 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
Hyrule19192 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
Hyrule19192 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
Hyrule19192 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
Replay Cast
00:00
HomeStory Cup 28 - Group C
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 241
NeuroSwarm 202
StarCraft: Brood War
JulyZerg 57
910 29
Leta 17
Icarus 5
Dota 2
monkeys_forever599
LuMiX2
League of Legends
JimRising 880
Super Smash Bros
C9.Mang01316
Mew2King72
Other Games
summit1g14113
tarik_tv5678
ToD123
Moletrap8
Organizations
Other Games
gamesdonequick1192
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• davetesta48
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Stunt362
Upcoming Events
Sparkling Tuna Cup
6h 22m
LiuLi Cup
7h 22m
Maru vs Reynor
Serral vs Rogue
Ladder Legends
14h 22m
Replay Cast
20h 22m
Replay Cast
1d 5h
Wardi Open
1d 8h
Monday Night Weeklies
1d 13h
OSC
1d 20h
WardiTV Winter Champion…
2 days
Replay Cast
3 days
[ Show More ]
WardiTV Winter Champion…
3 days
Replay Cast
3 days
PiG Sty Festival
4 days
The PondCast
4 days
KCM Race Survival
4 days
WardiTV Winter Champion…
4 days
Replay Cast
4 days
PiG Sty Festival
5 days
Epic.LAN
5 days
Replay Cast
5 days
PiG Sty Festival
6 days
CranKy Ducklings
6 days
Epic.LAN
6 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-02-14
Rongyi Cup S3
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
LiuLi Cup: 2025 Grand Finals
Nations Cup 2026
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025

Upcoming

Escore Tournament S1: King of Kings
[S:21] ASL SEASON OPEN 1st Round
[S:21] ASL SEASON OPEN 1st Round Qualifier
[S:21] ASL SEASON OPEN 2nd Round
[S:21] ASL SEASON OPEN 2nd Round Qualifier
Acropolis #4
IPSL Spring 2026
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
WardiTV Winter 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League Season 23
ESL Pro League Season 23
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.