• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 05:33
CEST 11:33
KST 18:33
  • 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 - The Finalists9[ASL21] Ro16 Preview Pt1: Fresh Flow9[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy21
Community News
2026 GSL Season 1 Qualifiers6Maestros of the Game 2 announced22026 GSL Tour plans announced4Weekly Cups (April 6-12): herO doubles, "Villains" prevail0MaNa leaves Team Liquid18
StarCraft 2
General
Team Liquid Map Contest #22 - The Finalists 2026 GSL Tour plans announced Maestros of the Game 2 announced Weekly Cups (April 6-12): herO doubles, "Villains" prevail MaNa leaves Team Liquid
Tourneys
2026 GSL Season 1 Qualifiers https://open.firstory.me/story/cmnzmkgd6001401wy1z Master Swan Open (Global Bronze-Master 2) SEL Doubles (SC Evo Bimonthly) Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 521 Memorable Boss The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power
Brood War
General
ASL21 General Discussion BGH Auto Balance -> http://bghmmr.eu/ Data needed A cwal.gg Extension - Easily keep track of anyone [ASL21] Ro16 Preview Pt1: Fresh Flow
Tourneys
[ASL21] Ro16 Group A [ASL21] Ro16 Group B [ASL21] Ro24 Group F [Megathread] Daily Proleagues
Strategy
What's the deal with APM & what's its true value Any training maps people recommend? Fighting Spirit mining rates Muta micro map competition
Other Games
General Games
Battle Aces/David Kim RTS Megathread Nintendo Switch Thread Stormgate/Frost Giant Megathread General RTS Discussion Thread Starcraft Tabletop Miniature Game
Dota 2
The Story of Wings Gaming Official 'what is Dota anymore' discussion
League of Legends
G2 just beat GenG in First stand
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 Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread Russo-Ukrainian War Thread European Politico-economics QA Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] Tokyo Olympics 2021 Thread
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Reappraising The Situation T…
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2130 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
Hyrule19202 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
Hyrule19202 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
Hyrule19202 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
Hyrule19202 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
09:00
KungFu Cup 2026 Week 4
CranKy Ducklings72
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Bisu 610
Zeus 391
actioN 209
PianO 147
ZerO 118
Soma 114
Larva 98
Pusan 93
Sharp 85
Killer 82
[ Show more ]
Dewaltoss 60
sorry 56
Shinee 47
Bale 43
Leta 43
Hm[arnc] 38
soO 21
Rush 14
Sacsri 10
Dota 2
XaKoH 499
XcaliburYe206
canceldota60
Counter-Strike
shoxiejesuss1117
allub179
Other Games
singsing1000
ceh9593
Happy237
Pyrionflax175
Mew2King79
ZerO(Twitch)9
Organizations
Other Games
BasetradeTV742
gamesdonequick465
Counter-Strike
PGL157
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• LUISG 38
• CranKy Ducklings SOOP2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos794
• TFBlade563
Upcoming Events
Kung Fu Cup
2h 27m
Replay Cast
14h 27m
The PondCast
1d
WardiTV Map Contest Tou…
1d 1h
CranKy Ducklings
1d 14h
Escore
2 days
WardiTV Map Contest Tou…
2 days
OSC
2 days
Korean StarCraft League
2 days
CranKy Ducklings
3 days
[ Show More ]
WardiTV Map Contest Tou…
3 days
IPSL
3 days
WolFix vs nOmaD
dxtr13 vs Razz
BSL
3 days
Sparkling Tuna Cup
4 days
WardiTV Map Contest Tou…
4 days
Ladder Legends
4 days
BSL
4 days
IPSL
4 days
JDConan vs TBD
Aegong vs rasowy
Replay Cast
4 days
Replay Cast
4 days
Wardi Open
5 days
Afreeca Starleague
5 days
Bisu vs Ample
Jaedong vs Flash
Monday Night Weeklies
5 days
RSL Revival
5 days
Afreeca Starleague
6 days
Barracks vs Leta
Royal vs Light
WardiTV Map Contest Tou…
6 days
Liquipedia Results

Completed

Proleague 2026-04-13
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
StarCraft2 Community Team League 2026 Spring
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

Escore Tournament S2: W3
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
RSL Revival: Season 5
2026 GSL S1
WardiTV TLMC #16
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
CCT Season 3 Global Finals
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.