• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 01:08
CEST 07:08
KST 14:08
  • 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
[ASL22] Finals Preview: Sweet Victory!9[ASL22] Ro4 Preview: Mirror Mirror6[ASL22] Ro8 Preview: Within Reach5[ASL22] Ro8 Preview: In A Tizzy11[ASL22] Ro16 Preview: Holy Diver5
Community News
[$1250] International ShieldBattery League14Weekly Cups (October 5-11): Farewell to 5.0.162Rollback Netcode in Brood War1165.0.17 Patch Notes - October 7, 202624Weekly Cups Results (Sep 28-Oct 4)0
StarCraft 2
General
Server Blocker How do you feel about the mass reverts in the 5.0.17 PTR? Team Liquid Map Contest #22: Results and Winners SCII needs to put more weight on strategy and tact Stellar Fest 2 Replay Pack
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament Master Swan Open (Global Bronze-Master 2) $3,500 WardiTV Not-Summer Championship Stellar Fest TWO the Moon (Dec 16-20) ISSL (IntoTheTV x SOOP SC2 League): Premier
Strategy
[H] ZvP Mid-Late Game: Stalkers Collossi HT
Custom Maps
[G] How to playtest arcade maps [A] Nemrods 1/4 players [M] (2) Sweltering Sands [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 547 Temple Of Terror Mutation # 546 Catch the Train Mutation # 545 And Drops and Rifts
Brood War
General
[Recap] Hive ZvZ in MonstarZ vs Dreams [ASL22] Finals Preview: Sweet Victory! Rollback Netcode in Brood War [Megathread] Daily Funny Videos Bot on ladder
Tourneys
[ASL22] Grand Finals [$1250] International ShieldBattery League 2v2v2v2 Tournament Small VOD Thread 2.0
Strategy
Cliff Jump Revisited (1 in a 1000 strategy) Simple Questions, Simple Answers Replay Review Process - What do you do?
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV General RTS Discussion Thread Warcraft III: The Frozen Throne
Dota 2
Dota 2 Champions League Season 3 Begins April 25!
League of Legends
[TL LoL EUW IHs] Teemo shall perish
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread The Chess Thread Things Aren’t Peaceful in Palestine
Fan Clubs
Serral Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Diablo Animated Series on Netflix
Sports
MLB/Baseball 2023 Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Recent Gifted Posts
Blogs
The Link Between Gaming and …
TrAiDoS
[ASL22] Ro4 Day1 Ticket Giv…
bITt.mAN
38 yo Retired SWE loo…
PurE)Rabbit-SF
Can Bots Beat Pros?? Starcr…
namkraft
[meme] I finally understa…
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 7307 users

The Big Programming Thread - Page 772

Forum Index > General Forum
Post a Reply
Prev 1 770 771 772 773 774 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.
Hhanh00
Profile Joined May 2016
34 Posts
October 04 2016 10:33 GMT
#15421
Too often you see developers who jump to coding before they have a solid design or any idea of what they need to do. Even in interviews they try to write code before having an algorithm. Sure, there are things that are better done on the computer but to get an idea of how a person's mind work, I think it's good to use a white board. Besides, relying on debuggers is a bad habit because nowadays many bugs are very hard to reproduce.
RoomOfMush
Profile Joined March 2015
1296 Posts
October 04 2016 12:11 GMT
#15422
That is why, as a cool kid, you rely on static and dynamic code analysis.

What we like to do in exams is give students unfinished code and a description of what the code is supposed to do and they have to finish the code or fix bugs if there are any. (We tell them beforehand if there are bugs or not)
They dont have to give us a perfect solution as long as it does what it is supposed to, but the space we give them on the sheets is very limited. We dont grade silly syntactical errors like missing semicolons or misspelled variable names unless they overdo it like not using ANY semicolons and stuff like that.

@JavaScript:
I sure am glad I never wanted to get involved with that. I saw it as the mess it was the first time I saw it in WebDev classes. There are a lot of job opportunities that rely on web-dev though.
tofucake
Profile Blog Joined October 2009
Hyrule19263 Posts
October 04 2016 13:12 GMT
#15423
On October 04 2016 19:24 Manit0u wrote:
Let me also share something that really cracked me up:
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f

There's a JS one too https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.1vn12jgr5
Liquipediaasante sana squash banana
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
October 04 2016 13:43 GMT
#15424
On October 04 2016 22:12 tofucake wrote:
Show nested quote +
On October 04 2016 19:24 Manit0u wrote:
Let me also share something that really cracked me up:
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f

There's a JS one too https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.1vn12jgr5


That's pretty much why I decided to move back to AngularJS 1, which is actually easy to use and doesn't require a billion extra things. Sure, it's a pre-2016 library, but I actually don't have the patience for all that nonsense.

JavaScript is a nice language, especially outside the bad browser implementations, but the whole environment around it is a mess and library developers have completely lost track of what web developers actually need. Then again, that seems to be a trend in frameworks and libraries in all programming languages these days.... or I'm just getting too old for this.
Hhanh00
Profile Joined May 2016
34 Posts
October 04 2016 14:14 GMT
#15425
On October 04 2016 22:12 tofucake wrote:
Show nested quote +
On October 04 2016 19:24 Manit0u wrote:
Let me also share something that really cracked me up:
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f

There's a JS one too https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.1vn12jgr5


The scary part is that it's not even the full picture. He didn't mention anything about node js and isomorphic webapps for example. haha
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
October 04 2016 17:29 GMT
#15426
On October 04 2016 19:33 Hhanh00 wrote:
Too often you see developers who jump to coding before they have a solid design or any idea of what they need to do. Even in interviews they try to write code before having an algorithm. Sure, there are things that are better done on the computer but to get an idea of how a person's mind work, I think it's good to use a white board. Besides, relying on debuggers is a bad habit because nowadays many bugs are very hard to reproduce.

Why would bugs be harder to reproduce nowadays than before?

Also jumping straight to code isn't exactly a terrible thing if you are actually refactoring towards good design (and not just cleaning up small stuff) frequently and consequently.
If you have a good reason to disagree with the above, please tell me. Thank you.
BluzMan
Profile Blog Joined April 2006
Russian Federation4235 Posts
Last Edited: 2016-10-04 18:35:03
October 04 2016 18:34 GMT
#15427
On October 05 2016 02:29 spinesheath wrote:
Show nested quote +
On October 04 2016 19:33 Hhanh00 wrote:
Too often you see developers who jump to coding before they have a solid design or any idea of what they need to do. Even in interviews they try to write code before having an algorithm. Sure, there are things that are better done on the computer but to get an idea of how a person's mind work, I think it's good to use a white board. Besides, relying on debuggers is a bad habit because nowadays many bugs are very hard to reproduce.

Why would bugs be harder to reproduce nowadays than before?

Also jumping straight to code isn't exactly a terrible thing if you are actually refactoring towards good design (and not just cleaning up small stuff) frequently and consequently.


Well, nowadays even mobile phones are quad-core, so much of production code is multithreaded. Debugging anything multithreaded is damn pain. You might not even have directly visible threads in your environment or even use a data-race-free language, but every now and then you're pretty much guaranteed to run into some case when multiple processors execute some code at the same time and the order of them producing results matters.
You want 20 good men, but you need a bad pussy.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
October 04 2016 19:28 GMT
#15428
On October 05 2016 03:34 BluzMan wrote:
Show nested quote +
On October 05 2016 02:29 spinesheath wrote:
On October 04 2016 19:33 Hhanh00 wrote:
Too often you see developers who jump to coding before they have a solid design or any idea of what they need to do. Even in interviews they try to write code before having an algorithm. Sure, there are things that are better done on the computer but to get an idea of how a person's mind work, I think it's good to use a white board. Besides, relying on debuggers is a bad habit because nowadays many bugs are very hard to reproduce.

Why would bugs be harder to reproduce nowadays than before?

Also jumping straight to code isn't exactly a terrible thing if you are actually refactoring towards good design (and not just cleaning up small stuff) frequently and consequently.


Well, nowadays even mobile phones are quad-core, so much of production code is multithreaded. Debugging anything multithreaded is damn pain. You might not even have directly visible threads in your environment or even use a data-race-free language, but every now and then you're pretty much guaranteed to run into some case when multiple processors execute some code at the same time and the order of them producing results matters.

And how is that different from various functions reading from and writing to global state in undocumented side effects? Bad code has always been and will always be hard to debug.
If you have a good reason to disagree with the above, please tell me. Thank you.
BluzMan
Profile Blog Joined April 2006
Russian Federation4235 Posts
October 04 2016 23:16 GMT
#15429
On October 05 2016 04:28 spinesheath wrote:
Show nested quote +
On October 05 2016 03:34 BluzMan wrote:
On October 05 2016 02:29 spinesheath wrote:
On October 04 2016 19:33 Hhanh00 wrote:
Too often you see developers who jump to coding before they have a solid design or any idea of what they need to do. Even in interviews they try to write code before having an algorithm. Sure, there are things that are better done on the computer but to get an idea of how a person's mind work, I think it's good to use a white board. Besides, relying on debuggers is a bad habit because nowadays many bugs are very hard to reproduce.

Why would bugs be harder to reproduce nowadays than before?

Also jumping straight to code isn't exactly a terrible thing if you are actually refactoring towards good design (and not just cleaning up small stuff) frequently and consequently.


Well, nowadays even mobile phones are quad-core, so much of production code is multithreaded. Debugging anything multithreaded is damn pain. You might not even have directly visible threads in your environment or even use a data-race-free language, but every now and then you're pretty much guaranteed to run into some case when multiple processors execute some code at the same time and the order of them producing results matters.

And how is that different from various functions reading from and writing to global state in undocumented side effects? Bad code has always been and will always be hard to debug.

That was the answer to why errors might be hard to reproduce. Bad code doesn't (usually) have stochastic nature, threading errors do. You might do "all the same things" and never reproduce the bug again.
You want 20 good men, but you need a bad pussy.
Hhanh00
Profile Joined May 2016
34 Posts
October 05 2016 00:17 GMT
#15430
On October 05 2016 04:28 spinesheath wrote:
Show nested quote +
On October 05 2016 03:34 BluzMan wrote:
On October 05 2016 02:29 spinesheath wrote:
On October 04 2016 19:33 Hhanh00 wrote:
Too often you see developers who jump to coding before they have a solid design or any idea of what they need to do. Even in interviews they try to write code before having an algorithm. Sure, there are things that are better done on the computer but to get an idea of how a person's mind work, I think it's good to use a white board. Besides, relying on debuggers is a bad habit because nowadays many bugs are very hard to reproduce.

Why would bugs be harder to reproduce nowadays than before?

Also jumping straight to code isn't exactly a terrible thing if you are actually refactoring towards good design (and not just cleaning up small stuff) frequently and consequently.


Well, nowadays even mobile phones are quad-core, so much of production code is multithreaded. Debugging anything multithreaded is damn pain. You might not even have directly visible threads in your environment or even use a data-race-free language, but every now and then you're pretty much guaranteed to run into some case when multiple processors execute some code at the same time and the order of them producing results matters.

And how is that different from various functions reading from and writing to global state in undocumented side effects? Bad code has always been and will always be hard to debug.


I said that bugs are harder to reproduce because we have more source of random bugs. The memory corruption issues you mentioned didn't go away and now we have multi-threading problems too since multi-core CPUs are common.

In a sense it is like micro vs macro. You don't need a computer to see if a guy is good at design. Once you have the data structures / model and the main work flow, implementation is not much of a deal.

Though, if you are hiring an entry-level developer whose job is only to code, you may have different priorities.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2016-10-05 00:45:08
October 05 2016 00:44 GMT
#15431
I have directions on my newest project in java 2 class has me create a GUI and then it does some stuff (what it does is unimportant).

They want me to implement one of my ActionListeners with an inner class, which I do. And in the constructor I add the listener to my button.

They also want me to implement one of my ActionListeners as an anonymous class. I am not sure how I go about doing this. Would I put my anonymous class inside my constructor.. like this?

member.addActionListener(new ActionListener() {

//ActionListener methods/code goes here

}; );

Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2016-10-05 02:02:08
October 05 2016 01:02 GMT
#15432
disregard.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
October 05 2016 01:14 GMT
#15433
I *think* I understand your description of it. But I still need to know, is my use of it correct in this context?

new ActionListener() { etc... } being the anonymous class?
OrangeGarage
Profile Joined October 2015
Korea (South)319 Posts
October 05 2016 01:30 GMT
#15434
Hihi~ I was just wondering if there was anyway to set 1 string equal to another in java!
I'm not talking about the .equals method, which only seems to return a boolean value, but a method that will directly transfer/copy String 1 to String 2!
I am drone! My dream is Hatchery!
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2016-10-05 01:38:31
October 05 2016 01:33 GMT
#15435
On October 05 2016 10:30 RCCar wrote:
Hihi~ I was just wondering if there was anyway to set 1 string equal to another in java!
I'm not talking about the .equals method, which only seems to return a boolean value, but a method that will directly transfer/copy String 1 to String 2!


Are you asking about copying the reference, or about copying the value?

Like, if your string you want to copy says "hello", do you want 2 different variables that point to this "hello", or do you want 2 different variables that point to 2 different "hello"s ?


If the answer is that you don't care and you just want stringOne to say the same thing as stringTwo, then just say

stringOne = stringTwo;


I guess Strings are immutable in java so copying the reference is irrelevant anyways.
Hanh
Profile Joined June 2016
146 Posts
October 05 2016 01:35 GMT
#15436
On October 05 2016 10:14 travis wrote:
I *think* I understand your description of it. But I still need to know, is my use of it correct in this context?

new ActionListener() { etc... } being the anonymous class?


That's correct.
Blitzkrieg0, what you described isn't an anonymous class in Java. It looks more like what C has but in your example the anonymous class has a name so I'm not sure what you mean by this.
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
October 05 2016 02:05 GMT
#15437
On October 05 2016 10:35 Hanh wrote:
Show nested quote +
On October 05 2016 10:14 travis wrote:
I *think* I understand your description of it. But I still need to know, is my use of it correct in this context?

new ActionListener() { etc... } being the anonymous class?


That's correct.
Blitzkrieg0, what you described isn't an anonymous class in Java. It looks more like what C has but in your example the anonymous class has a name so I'm not sure what you mean by this.


Apparently I have no idea what I'm talking about, but after reading up on it I have no idea why you'd want to do functional programming in Java.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Wrath
Profile Blog Joined July 2014
3175 Posts
Last Edited: 2016-10-05 04:51:31
October 05 2016 04:50 GMT
#15438
On October 04 2016 19:24 Manit0u wrote:
Let me also share something that really cracked me up:
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f


That was interesting read and described my suffering to learn front-end development :D

This paragraph caught my interest:

No one does at the beginning. Look, you just need to know that functional programming is better than OOP and that’s what we should be using in 2016


Why?

I don't know what FP is, I'll do some research on it but I never thought that OOP would become out dated one day. Is it really on a decline?
Djagulingu
Profile Blog Joined December 2010
Germany3605 Posts
October 05 2016 05:56 GMT
#15439
On October 05 2016 13:50 Wrath wrote:
Show nested quote +
On October 04 2016 19:24 Manit0u wrote:
Let me also share something that really cracked me up:
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f


That was interesting read and described my suffering to learn front-end development :D

This paragraph caught my interest:

Show nested quote +
No one does at the beginning. Look, you just need to know that functional programming is better than OOP and that’s what we should be using in 2016


Why?

I don't know what FP is, I'll do some research on it but I never thought that OOP would become out dated one day. Is it really on a decline?

OOP can get really shitty really fast with all those objects rollin around and shit. FP, in my really subjective and personal opinion, yields a much more readable and maintainable codebase.

Simple FP example:

"Load the data" -> "Do this shit on the data" -> "Do that shit on the data" -> "Do the other shit on the data" -> "Store the data"

As you know exactly what this shit, that shit or the other shit is, you can maintain your code a whole lot easier.
"windows bash is a steaming heap of shit" tofucake
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
October 05 2016 06:01 GMT
#15440
On October 05 2016 13:50 Wrath wrote:
Show nested quote +
On October 04 2016 19:24 Manit0u wrote:
Let me also share something that really cracked me up:
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f


That was interesting read and described my suffering to learn front-end development :D

This paragraph caught my interest:

Show nested quote +
No one does at the beginning. Look, you just need to know that functional programming is better than OOP and that’s what we should be using in 2016


Why?

I don't know what FP is, I'll do some research on it but I never thought that OOP would become out dated one day. Is it really on a decline?


OOP as such is not on a decline since it's still very useful. However, pretty much all OOP languages these days, from C++ to PHP to Java, include a bit of functional programming in the form of lambdas, since those make a lot of stuff easier. There won't be a switch to full functional programming because functional programming has it's own flaws, but modern programming is a mix of both.

For example, taking something from my own Java refresher project:

The functional way:
technologies.addAll(getGameModel().getTechnologies().filterAll(t -> t.hasDependencies(faction) && !faction.hasTechnology(t)));


The OOP way:
for (Technology tech : getGameModel().getTechnologies())
{
if (tech.hasDependencies(faction) && !faction.hasTechnology(tech))
{
technologies.add(tech);
}
}


Both do the same thing, but the functional way is more concise and actually more readable once you get used to the syntax. Of course you can hide the loops in methods to make them more readable but then that method is long and ugly compared to a single lambda.

In addition to being easier to read, it can also make multithreaded programming easier, because lambdas can be executed in parallel unless you make them change outside state, which you shouldn't, and programming languages like C# and Java can almost automatically turn your code into multithreaded code.

Singlethreaded:
allEntities.stream().filter(e -> e.getType() == StarSystemEntityType.PLANET).collect(Collectors.toList());


Multithreaded:
allEntities.stream().parallel().filter(e -> e.getType() == StarSystemEntityType.PLANET).collect(Collectors.toList());


Of course that way you don't have a lot of control over the multithreading since it happens behind the scenes, but it's an easy way to optimize the processing of large lists on multicore systems and modern compilers tend to be smarter than the programmers using them anyways.

The future is neither OOP nor Functional, it's a good mix of the best parts of both.
Prev 1 770 771 772 773 774 1032 Next
Please log in or register to reply.
Live Events Refresh
Korean StarCraft League
12:00
KSL Week 92
davetesta53
EnkiAlexander 52
Liquipedia
PSISTORM Gaming Misc
09:00
FSL draft
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 247
ProTech152
StarCraft: Brood War
Rain 2901
ZergMaN 81
Sexy 57
Noble 15
Terrorterran 13
Icarus 6
Dota 2
NeuroSwarm236
League of Legends
JimRising 700
Other Games
summit1g7004
WinterStarcraft544
C9.Mang0274
Livibee185
Liquid`Ken12
Organizations
Other Games
gamesdonequick932
StarCraft 2
IntoTheiNu 512
[ Show 11 non-featured ]
StarCraft 2
• Nickrosys11
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• Azhi_Dahaki11
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• Shiphtur542
Upcoming Events
Afreeca Starleague
52m
Rush vs Soulkey
CranKy Ducklings
4h 52m
WardiTV Invitational
5h 52m
AI Arena Tournament
10h 52m
BSL Open Qualifier
13h 52m
Sparkling Tuna Cup
1d 4h
OSC
1d 7h
IPSL
1d 10h
BSL Open Qualifier
1d 13h
WardiTV Weekly
2 days
[ Show More ]
IntoTheTV X SOOP
3 days
PiGosaur Cup
3 days
The PondCast
4 days
Kung Fu Cup
4 days
IntoTheTV X SOOP
5 days
Liquipedia Results

Completed

Super Anchor Qualifying S3
Blizzard Classic Cup 2026
Copium Cup

Ongoing

ASL Season 22
Acropolis #5
KCM Race Survival 2026 Season 4
Acropolis #5 - GSC
HCC Season 3
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #3
BLAST Open Fall 2026
Esports World Cup 2026

Upcoming

BSL Season 23
SC4ALL II: Brood War
BSL 23: Non-Korean Championship
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
eXTREMESLAND 2026
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
Stake Ranked Episode 5
PGL Masters Bucharest 2026
eXTREMESLAND '26: SEA 4th Place
1win Private Club #2
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.