• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:13
CET 13:13
KST 21:13
  • 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 - Presented by Monster Energy5ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13
Community News
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool29Weekly Cups (March 9-15): herO, Clem, ByuN win32026 KungFu Cup Announcement6BGE Stara Zagora 2026 cancelled12Blizzard Classic Cup - Tastosis announced as captains18
StarCraft 2
General
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Team Liquid Map Contest #22 - Presented by Monster Energy Serral: 24’ EWC form was hurt by military service Weekly Cups (March 9-15): herO, Clem, ByuN win Weekly Cups (August 25-31): Clem's Last Straw?
Tourneys
RSL Season 4 announced for March-April Sparkling Tuna Cup - Weekly Open Tournament WardiTV Team League Season 10 KSL Week 87 [GSL CK] #2: Team Classic vs. Team Solar
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 517 Distant Threat Mutation # 516 Specter of Death Mutation # 515 Together Forever
Brood War
General
Gypsy to Korea ASL21 General Discussion JaeDong's form before ASL BGH Auto Balance -> http://bghmmr.eu/ BSL Season 22
Tourneys
[BSL22] Open Qualifiers & Ladder Tours [Megathread] Daily Proleagues Small VOD Thread 2.0 IPSL Spring 2026 is here!
Strategy
Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread General RTS Discussion Thread Path of Exile Stormgate/Frost Giant Megathread Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
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
Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Mexico's Drug War
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 Tokyo Olympics 2021 Thread General nutrition recommendations Cricket [SPORT]
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2485 users

The Big Programming Thread - Page 744

Forum Index > General Forum
Post a Reply
Prev 1 742 743 744 745 746 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.
Manit0u
Profile Blog Joined August 2004
Poland17695 Posts
July 21 2016 20:10 GMT
#14861
On July 22 2016 01:56 Shield wrote:
Verbosity is good as long as it's not abused. You should really read Clean Code before you go further with this discussion.


I did read it. And I still think that "readAllLines" could as well be "getLines" without any detriment to readability...
Time is precious. Waste it wisely.
Birdie
Profile Blog Joined August 2007
New Zealand4438 Posts
July 21 2016 20:20 GMT
#14862
Aren't reallyLongAndAwesomelyDescriptiveMethodNames good sometimes? If it's the most accurate way of describing the use of the function then it isn't unnecessary or useless, even if it's a bit long. Plus with autocomplete, it's not "expensive" for typing to have a longer method name.
Red classic | A butterfly dreamed he was Zhuangzi | 4.5k, heading to 5k as support!
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2016-07-21 21:20:17
July 21 2016 21:15 GMT
#14863
On July 22 2016 05:20 Birdie wrote:
Aren't reallyLongAndAwesomelyDescriptiveMethodNames good sometimes? If it's the most accurate way of describing the use of the function then it isn't unnecessary or useless, even if it's a bit long. Plus with autocomplete, it's not "expensive" for typing to have a longer method name.


Descriptive method name is like first impression from meeting someone. Do you want to impress them or do you want to disgust them?

On July 22 2016 05:10 Manit0u wrote:
Show nested quote +
On July 22 2016 01:56 Shield wrote:
Verbosity is good as long as it's not abused. You should really read Clean Code before you go further with this discussion.


I did read it. And I still think that "readAllLines" could as well be "getLines" without any detriment to readability...


"getLines"? Which lines? If you have N lines (N = 10), how many lines? From 1 to 5? From 1 to 6? From 1 to n? readAllLines is unambigious. There is no confusion at all.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2016-07-21 21:20:10
July 21 2016 21:19 GMT
#14864
second post by mistake
Prillan
Profile Joined August 2011
Sweden350 Posts
Last Edited: 2016-07-21 21:24:57
July 21 2016 21:21 GMT
#14865
On July 22 2016 05:20 Birdie wrote:
Aren't reallyLongAndAwesomelyDescriptiveMethodNames good sometimes? If it's the most accurate way of describing the use of the function then it isn't unnecessary or useless, even if it's a bit long. Plus with autocomplete, it's not "expensive" for typing to have a longer method name.


In my opinion, if you need a whole sentence to name a method, it's probably the case that the method is way too complex and needs to be re-factored.

EDIT: readAllLines is a perfectly fine name. getAllLines would be fine too, but I don't particularly like getLines for the same reason as the previous poster.
TheBB's sidekick, aligulac.com | "Reality is frequently inaccurate." - Douglas Adams
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2016-07-21 21:30:07
July 21 2016 21:26 GMT
#14866
On July 22 2016 06:21 Prillan wrote:
Show nested quote +
On July 22 2016 05:20 Birdie wrote:
Aren't reallyLongAndAwesomelyDescriptiveMethodNames good sometimes? If it's the most accurate way of describing the use of the function then it isn't unnecessary or useless, even if it's a bit long. Plus with autocomplete, it's not "expensive" for typing to have a longer method name.


In my opinion, if you need a whole sentence to name a method, it's probably the case that the method is way too complex and needs to be re-factored.


What about this one?


deserialiseResultAndRecordInDatabase(Json json)
{
SomeResult result = SomeResult::deserialise(json);
_database.recordResult(result);
}


It could be broken down into two separate methods. I agree with that, but it's not a complex method despite long name.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
July 21 2016 21:41 GMT
#14867
--- Nuked ---
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
July 21 2016 22:57 GMT
#14868
On July 22 2016 06:41 Nesserev wrote:
Show nested quote +
On July 22 2016 00:00 Manit0u wrote:
This thread is the best on TL

Clearly, you have never visited the 'Korean Music Discussion' thread.

All this talk about Java's (and C#) verbosity, while there are clearly bigger gripes to be had with Java; generics are fundamentally broken, lack of constness, equals() vs. ==, mandatory checked exceptions, horrible APIs, 'package' being the default access modifier, etc.


Broken generics? What do you mean?
tofucake
Profile Blog Joined October 2009
Hyrule19196 Posts
July 21 2016 23:16 GMT
#14869
On July 22 2016 02:36 Doodsmack wrote:
Are Microsoft SQL Server skills (including T-SQL obv) valuable and future-secure?

no

Good to know, and there will always be MSSQL jobs, but Linux servers are like 98% of the internet
Liquipediaasante sana squash banana
ZenithM
Profile Joined February 2011
France15952 Posts
Last Edited: 2016-07-21 23:24:48
July 21 2016 23:21 GMT
#14870
On July 22 2016 06:21 Prillan wrote:
Show nested quote +
On July 22 2016 05:20 Birdie wrote:
Aren't reallyLongAndAwesomelyDescriptiveMethodNames good sometimes? If it's the most accurate way of describing the use of the function then it isn't unnecessary or useless, even if it's a bit long. Plus with autocomplete, it's not "expensive" for typing to have a longer method name.


In my opinion, if you need a whole sentence to name a method, it's probably the case that the method is way too complex and needs to be re-factored.

EDIT: readAllLines is a perfectly fine name. getAllLines would be fine too, but I don't particularly like getLines for the same reason as the previous poster.

I like "readAllLines" better than "getAllLines" because in the first case the I/O process is clear (probably with side effects too), and "get" in general is a really vague method prefix. I know it's idiomatic Java, but you could just name the get method "allLines" instead, like we would do in Scala.

On July 22 2016 07:57 Shield wrote:
Show nested quote +
On July 22 2016 06:41 Nesserev wrote:
On July 22 2016 00:00 Manit0u wrote:
This thread is the best on TL

Clearly, you have never visited the 'Korean Music Discussion' thread.

All this talk about Java's (and C#) verbosity, while there are clearly bigger gripes to be had with Java; generics are fundamentally broken, lack of constness, equals() vs. ==, mandatory checked exceptions, horrible APIs, 'package' being the default access modifier, etc.


Broken generics? What do you mean?

He probably means that they're just a patchwork solution and not actually designed into the JVM. Fucking casts from Object everywhere :D. Also, at the compiler level, the type system is really restrictive as far as generics go.
Manit0u
Profile Blog Joined August 2004
Poland17695 Posts
Last Edited: 2016-07-22 01:01:42
July 22 2016 00:37 GMT
#14871
On July 22 2016 08:21 ZenithM wrote:
Show nested quote +
On July 22 2016 06:21 Prillan wrote:
On July 22 2016 05:20 Birdie wrote:
Aren't reallyLongAndAwesomelyDescriptiveMethodNames good sometimes? If it's the most accurate way of describing the use of the function then it isn't unnecessary or useless, even if it's a bit long. Plus with autocomplete, it's not "expensive" for typing to have a longer method name.


In my opinion, if you need a whole sentence to name a method, it's probably the case that the method is way too complex and needs to be re-factored.

EDIT: readAllLines is a perfectly fine name. getAllLines would be fine too, but I don't particularly like getLines for the same reason as the previous poster.

I like "readAllLines" better than "getAllLines" because in the first case the I/O process is clear (probably with side effects too), and "get" in general is a really vague method prefix. I know it's idiomatic Java, but you could just name the get method "allLines" instead, like we would do in Scala.


Well, getLines is from Scala actually

http://www.scala-lang.org/api/current/index.html#scala.io.Source@getLines():Iterator[String]

Anyway, while I agree that unambiguous names are good, probably if your class/method name is long it's probably too complex or too descriptive (I find that programmers tend to be smart people and can infer quite a lot of information that isn't readily present).

I mean, let's just compare some simple stuff from commonly used applications (a simple controller in a web framework):

Java (Spring):

package hello;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
public class GreetingController {

@RequestMapping("/greeting")
public String greeting(@RequestParam(value="name", required=false, defaultValue="World") String name, Model model) {
model.addAttribute("name", name);
return "greeting";
}

}


Ruby (Rails):

class GreetingController < ApplicationController
def greeting
defaults = {:name => 'World'}
params = defaults.merge(params)

@greeting.name = params[:name]
end
end


Python (Django):

// non-class based views
def greeting(request, name='World'):
return render_to_response('greeting.html', {'name': request.GET['name']})

// class based views
from django.views.generic import View

class GreetingView(View):
def get(self, request, name='World'):
return render_to_response('greeting.html', {'name': request.GET['name']})


I might be a bit off with Django, haven't done anything in it for a while.

As you can see, it's definitely possible to achieve the same thing without being too verbose and without losing too much clarity on the matter.

The biggest problem that Java's verbosity poses for me is not the fact that it's hard to understand but the fact that there's simply so much more to read, which significantly increases time required to assess the code and its function. I don't know about you but I read code way more often than I write it and making this process harder isn't good for me.

In this regard Ruby is pretty awesome. Just going back to our readAllLines examples:

File.open('my_file.txt').each_line

File.readlines('my_file.txt')

File.foreach('my_file.txt')


All of them will work.
Time is precious. Waste it wisely.
berated-
Profile Blog Joined February 2007
United States1134 Posts
July 22 2016 01:10 GMT
#14872
On July 22 2016 08:16 tofucake wrote:
Show nested quote +
On July 22 2016 02:36 Doodsmack wrote:
Are Microsoft SQL Server skills (including T-SQL obv) valuable and future-secure?

no

Good to know, and there will always be MSSQL jobs, but Linux servers are like 98% of the internet


Which is probably why MS SQL is coming to linux.
tofucake
Profile Blog Joined October 2009
Hyrule19196 Posts
July 22 2016 02:06 GMT
#14873
Yeah Microsoft realized they can't compete with php/js/mysql if their shit doesn't work on Linux, which is a big part of why they are open sourcing and porting everything.
Liquipediaasante sana squash banana
RoomOfMush
Profile Joined March 2015
1296 Posts
July 22 2016 07:02 GMT
#14874
On July 22 2016 06:41 Nesserev wrote:
All this talk about Java's (and C#) verbosity, while there are clearly bigger gripes to be had with Java; generics are fundamentally broken, lack of constness, equals() vs. ==, mandatory checked exceptions, horrible APIs, 'package' being the default access modifier, etc.

What is so bad about javas generics? I have much bigger problems with C#'s generics since they dont have the wildcard operator. I often find myself wishing I could write List<?> but that is not as easy as it is in Java. The only problem with Java generics I have is the fact you can not create generic arrays or call .class on generic type parameters (for obvious reasons).

What is the lack of "constness"?

And what is the problem of "equals() vs. =="? Do you mean you have a problem with both having a different meaning in java? Because I dont know why having more options is bad compared to having two ways to do the same thing.

Checked exceptions are not a bad thing either. It is bad that they are used within the JDK, but I am very happy that I can define my own checked exceptions and force myself to use them in my code with a compiler pointing out everytime I missed one.

The package access modifier is shit though. But its a relict of the very first versions of java. Its history and the java people dont ever want to break backwards compatibility (which you can like or dislike but at least they are consistent).
Prillan
Profile Joined August 2011
Sweden350 Posts
July 22 2016 11:20 GMT
#14875
On July 22 2016 06:26 Shield wrote:
Show nested quote +
On July 22 2016 06:21 Prillan wrote:
On July 22 2016 05:20 Birdie wrote:
Aren't reallyLongAndAwesomelyDescriptiveMethodNames good sometimes? If it's the most accurate way of describing the use of the function then it isn't unnecessary or useless, even if it's a bit long. Plus with autocomplete, it's not "expensive" for typing to have a longer method name.


In my opinion, if you need a whole sentence to name a method, it's probably the case that the method is way too complex and needs to be re-factored.


What about this one?


deserialiseResultAndRecordInDatabase(Json json)
{
SomeResult result = SomeResult::deserialise(json);
_database.recordResult(result);
}


It could be broken down into two separate methods. I agree with that, but it's not a complex method despite long name.

It's not always true of course, but in this case I don't see the need of an extra function at all. I'd just write

database.record_result(deserialize(data))

or if I had to name it, store_result would be enough.

Anyways, let's not get into too many examples because we could end up doing that forever otherwise, so let me rephrase it.

In my opinion, in general, if you need a whole sentence to name a method, you could probably refactor it or rename it.

I don't think that Java is overly verbose on this, but Swift on the other hand, just wow.
TheBB's sidekick, aligulac.com | "Reality is frequently inaccurate." - Douglas Adams
Manit0u
Profile Blog Joined August 2004
Poland17695 Posts
July 22 2016 11:42 GMT
#14876
Tried to update Apache Camel to newer version, including the dependencies. Upped the versions in pom.xml, mvn clean, mvn install and now the builds fail because fucking spring-test package is using juni4 packages instead of junit38 and every single test fails to compile since 90% of the imports are now obsolete or changed.

I hate my life right now.
Time is precious. Waste it wisely.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2016-07-22 11:55:07
July 22 2016 11:54 GMT
#14877
--- Nuked ---
RoomOfMush
Profile Joined March 2015
1296 Posts
July 22 2016 13:01 GMT
#14878
You have the "final" keyword in java which does just that. If a variable is declared final its value will never change. If a class is declared final it can not be extended anymore. If a method is final it can not be overwritten.
Its not exactly what you are describing though.

All these things you mention can be done in java with code but are special functions build into the core of the language instead. I can see how some people can like that, but I prefer less keywords and doing things on my own by writing good code. I mean I can see these things being useful, but I never actually needed them myself.
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2016-07-22 15:23:55
July 22 2016 13:14 GMT
#14879
On July 22 2016 22:01 RoomOfMush wrote:
You have the "final" keyword in java which does just that. If a variable is declared final its value will never change. If a class is declared final it can not be extended anymore. If a method is final it can not be overwritten.
Its not exactly what you are describing though.

All these things you mention can be done in java with code but are special functions build into the core of the language instead. I can see how some people can like that, but I prefer less keywords and doing things on my own by writing good code. I mean I can see these things being useful, but I never actually needed them myself.


Final and const are not equivalent at all. Setting a parameter to const says that the function will not change that value. Java's final makes it immutable so it can never be changed. For instance, I could have the following functions:

void printValue(const int value)
int addValue(int value)

Consider the situation where I pass value to printValue, addValue, and then printValue again. I can pass my int to each of these functions and const just guarantees that the value won't be changed.

If I made a final int in Java like you suggest then I wouldn't be able to call addValue. Const provides a completely different meaning.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2016-07-22 13:30:01
July 22 2016 13:15 GMT
#14880
--- Nuked ---
Prev 1 742 743 744 745 746 1032 Next
Please log in or register to reply.
Live Events Refresh
RSL Revival
10:00
Season 4: Playoffs Day 1
Cure vs ByuNLIVE!
Tasteless1341
IndyStarCraft 196
Rex119
CranKy Ducklings93
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Tasteless 1341
IndyStarCraft 196
SortOf 146
Rex 119
ProTech117
MindelVK 22
StarCraft: Brood War
Calm 14122
Horang2 2312
Jaedong 1632
BeSt 1015
Pusan 369
Stork 318
Mini 215
Zeus 211
Last 179
JYJ 152
[ Show more ]
Leta 145
ggaemo 115
Dewaltoss 105
Hyun 90
Aegong 75
Killer 57
ToSsGirL 54
Mind 53
JulyZerg 48
Backho 36
EffOrt 35
[sc1f]eonzerg 33
sSak 27
yabsab 24
IntoTheRainbow 22
soO 16
Hm[arnc] 15
Noble 13
Sacsri 13
SilentControl 10
Britney 0
Dota 2
XaKoH 698
XcaliburYe561
canceldota88
League of Legends
Reynor64
Counter-Strike
fl0m2331
Stewie2K859
zeus373
kRYSTAL_34
Heroes of the Storm
Khaldor59
Trikslyr36
Other Games
B2W.Neo920
Fuzer 196
Sick153
crisheroes147
byalli92
KnowMe70
RotterdaM36
Hui .30
DeMusliM1
Organizations
Dota 2
PGL Dota 2 - Main Stream195
StarCraft: Brood War
lovetv 20
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• LUISG 35
• CranKy Ducklings SOOP6
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos875
Upcoming Events
uThermal 2v2 Circuit
2h 48m
BSL
7h 48m
RSL Revival
21h 48m
herO vs MaxPax
Rogue vs TriGGeR
BSL
1d 7h
Replay Cast
1d 11h
Replay Cast
1d 20h
Afreeca Starleague
1d 21h
Sharp vs Scan
Rain vs Mong
Wardi Open
1d 23h
Monday Night Weeklies
2 days
Sparkling Tuna Cup
2 days
[ Show More ]
Afreeca Starleague
2 days
Soulkey vs Ample
JyJ vs sSak
Replay Cast
3 days
Afreeca Starleague
3 days
hero vs YSC
Larva vs Shine
Kung Fu Cup
3 days
Replay Cast
4 days
KCM Race Survival
4 days
The PondCast
4 days
WardiTV Team League
4 days
Replay Cast
5 days
WardiTV Team League
5 days
RSL Revival
6 days
WardiTV Team League
6 days
Liquipedia Results

Completed

Proleague 2026-03-20
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
BSL Season 22
CSL Elite League 2026
RSL Revival: Season 4
Nations Cup 2026
NationLESS Cup
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

ASL Season 21
Acropolis #4 - TS6
2026 Changsha Offline CUP
CSL 2026 SPRING (S20)
CSL Season 20: Qualifier 1
Acropolis #4
IPSL Spring 2026
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
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
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
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.