• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 16:00
CET 22:00
KST 06:00
  • 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
TL.net Map Contest #21: Winners2Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
Starcraft, SC2, HoTS, WC3, returning to Blizzcon!20$5,000+ WardiTV 2025 Championship5[BSL21] RO32 Group Stage3Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win9
StarCraft 2
General
TL.net Map Contest #21: Winners Starcraft, SC2, HoTS, WC3, returning to Blizzcon! RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
$5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest Merivale 8 Open - LAN - Stellar Fest Sea Duckling Open (Global, Bronze-Diamond) $3,500 WardiTV Korean Royale S4
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review [BSL21] RO32 Group Stage Practice Partners (Official) [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[Megathread] Daily Proleagues [BSL21] RO32 Group B - Sunday 21:00 CET [BSL21] RO32 Group A - Saturday 21:00 CET BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION
Strategy
Current Meta How to stay on top of macro? PvZ map balance Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV ZeroSpace Megathread General RTS Discussion Thread
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 SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine YouTube Thread Dating: How's your luck?
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Why we need SC3
Hildegard
Career Paths and Skills for …
TrAiDoS
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1234 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
Hyrule19151 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
Hyrule19151 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
Hyrule19151 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
Hyrule19151 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
LAN Event
18:00
Day 3: Ursa 2v2, FFA
SteadfastSC393
IndyStarCraft 177
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 499
SteadfastSC 393
White-Ra 211
IndyStarCraft 177
UpATreeSC 142
ProTech125
Railgan 67
ROOTCatZ 43
StarCraft: Brood War
Shuttle 460
Bonyth 69
ivOry 14
Dota 2
Dendi985
Counter-Strike
pashabiceps1182
Foxcn163
Super Smash Bros
Liquid`Ken9
Heroes of the Storm
Liquid`Hasu516
Other Games
Beastyqt728
fl0m665
Mlord452
FrodaN427
shahzam403
KnowMe185
Pyrionflax168
C9.Mang0125
ArmadaUGS115
ToD77
Mew2King74
Trikslyr53
OptimusSC21
Organizations
Counter-Strike
PGL192
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• Adnapsc2 11
• Reevou 9
• Dystopia_ 0
• Kozan
• sooper7s
• AfreecaTV YouTube
• Migwel
• LaughNgamezSOOP
• intothetv
• IndyKCrew
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 3055
• Ler92
League of Legends
• TFBlade886
Other Games
• imaqtpie1303
• WagamamaTV341
• Scarra290
• Shiphtur221
Upcoming Events
OSC
1h
Replay Cast
2h
OSC
15h
LAN Event
18h
Korean StarCraft League
1d 6h
CranKy Ducklings
1d 13h
LAN Event
1d 18h
IPSL
1d 21h
dxtr13 vs OldBoy
Napoleon vs Doodle
BSL 21
1d 23h
Gosudark vs Kyrie
Gypsy vs Sterling
UltrA vs Radley
Dandy vs Ptak
Replay Cast
2 days
[ Show More ]
Sparkling Tuna Cup
2 days
WardiTV Korean Royale
2 days
LAN Event
2 days
IPSL
2 days
JDConan vs WIZARD
WolFix vs Cross
BSL 21
2 days
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
Replay Cast
3 days
Wardi Open
3 days
WardiTV Korean Royale
4 days
Replay Cast
5 days
Kung Fu Cup
5 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
6 days
The PondCast
6 days
RSL Revival
6 days
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

BSL 21 Points
SC4ALL: StarCraft II
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025

Upcoming

BSL Season 21
SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
Stellar Fest
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
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.