• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:41
CEST 15:41
KST 22:41
  • 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
Serral wins Maestros of the Game 225ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection7
Community News
MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon325.0.16 Hotfix (June 30) - Balance + Bug Fixes38Weekly Cups (June 22-28): Zergs thrive in new patch5[TLMC] Summer 2026 Ladder Map Rotation05.0.16 patch for SC2 goes live (8 worker start)99
StarCraft 2
General
ZOWIE DIVINA preview MC vs IdrA, Boxer vs Nal_rA to be Legacy Matches @ BlizzCon Serral wins Maestros of the Game 2 TL Poll: How do you feel about the 5.0.16 PTR balance changes? Server Blocker
Tourneys
RSL Revival: Season 6 - Qualifiers and Main Event HomeStory Cup 29 Vespene Cup #1 — $300+ USD, July 10 Douyu Cup 2026: $20,000 Legends Event (June 26-28) Crank Gathers Season 4: BW vs SC2 Team League
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
Mutation # 533 Die Together The PondCast: SC2 News & Results Mutation # 532 Nuclear Family Mutation # 531 Experimental Artillery
Brood War
General
Snow On New ASL S22 Map, Zerg Nerf ASL 22 Proposed Map Pool Farewell Beloved Starcraft (Youtube Videos) BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion
Tourneys
CSLAN 4 is Coming! Escore Tournament StarCraft Season 2 The Casual Games of the Week Thread [Megathread] Daily Proleagues
Strategy
Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies Why doesn't anyone use restoration?
Other Games
General Games
Dawn of War IV Stormgate/Frost Giant Megathread Summer Games Done Quick 2026! Nintendo Switch Thread ZeroSpace at Steam NextFest - Last free demo
Dota 2
Looking for a Dota Mentor 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
TL Mafia
Five o'clock TL Mafia NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread TL Mafia Power Rank Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread YouTube Thread Canadian Politics Mega-thread The Games Industry And ATVI
Fan Clubs
The HerO Fan Club! The herO Fan Club!
Media & Entertainment
Movie Discussion! Series you have seen recently... [Req][Books] Good Fantasy/SciFi books [TV/BOOK] *SPOILERS* Game of Thrones Discussion
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story TeamLiquid Health and Fitness Initiative For 2023 Cricket [SPORT]
World Cup 2022
Tech Support
How to clean a TTe Thermaltake keyboard? Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Major Shifts in the Gaming I…
TrAiDoS
An Exploration of th…
waywardstrategy
I'm an arrogant trash talke…
FlaShFTW
Gauntlet SC2: A Retrospectiv…
Ctone23
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 5199 users

The Big Programming Thread - Page 586

Forum Index > General Forum
Post a Reply
Prev 1 584 585 586 587 588 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.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2015-02-14 12:28:52
February 14 2015 12:10 GMT
#11701
compiler is more important than IDE, yes... at least when it comes to msvc vs gcc / clang...
unless you don't mind being stuck in last century. you can't easily emulate compiler functionality (what you are allowed to write), emulating IDE features is trivial (how you write). it's like saying i'd rather express myself with the pen than the pencil, even if that means the pen only allows me to write the words "stool", "floor" and "james". it's the elegance of the code that matters, not the elegance with which you wrote it...

regardless there are IDE's that easily let you use gcc or clang and are available on windows platform.
conspired against by a confederacy of dunces.
sabas123
Profile Blog Joined December 2010
Netherlands3122 Posts
February 14 2015 15:03 GMT
#11702
Almost everyone I read online about vim tells me to rebind esc to tab, but doesn't that become a nightmare when your working in nest programs?
The harder it becomes, the more you should focus on the basics.
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
February 14 2015 15:45 GMT
#11703
You should have caps lock become esc. Nobody uses caps lock (if you really use it, make esc caps lock), and it's a lot closer than the esc button.
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
sabas123
Profile Blog Joined December 2010
Netherlands3122 Posts
February 14 2015 15:52 GMT
#11704
On February 15 2015 00:45 Arnstein wrote:
You should have caps lock become esc. Nobody uses caps lock (if you really use it, make esc caps lock), and it's a lot closer than the esc button.

I orginally meant tab but caps lock seems a good idea.
The harder it becomes, the more you should focus on the basics.
Ropid
Profile Joined March 2009
Germany3557 Posts
February 14 2015 17:49 GMT
#11705
On February 14 2015 19:51 darkness wrote:
Show nested quote +
On February 14 2015 19:00 nunez wrote:
if you have the choice, go for gcc or clang...
not msvc...


So trade a compiler for an IDE? Sounds wise.

You can extend Vim and Emacs, and it seems there's a good chance that you can get it to do everything you want from an IDE from what I've seen (about people using Emacs at least).

The scripts in the editor can for example know all definitions in your project, meaning you can do things like jump to where the definition of what's under the cursor is even if it's in another file.

It's possible to run and process the result of external programs, and then for example collect a list of compiler errors that you can use to jump to where it is inside the editor, and it can highlight stuff in there.

Interaction with currently running external programs like a debugger is also possible, you can then set break points and stuff where you edit your code and this gets sent to the debugger, and then the other direction, the scripts can get to variable and register contents and whatnot from the running debugger and you can then browse that in a buffer inside the editor.
"My goal is to replace my soul with coffee and become immortal."
TMG26
Profile Joined July 2012
Portugal2017 Posts
February 14 2015 18:21 GMT
#11706
~Why not just use an IDE that has some vim integration?
Supporter of the situational Blink Dagger on Storm.
Ropid
Profile Joined March 2009
Germany3557 Posts
Last Edited: 2015-02-14 18:48:27
February 14 2015 18:46 GMT
#11707
I guess you just slowly grow it into something you're happy with over the years, and then using that editor just feels like home.
"My goal is to replace my soul with coffee and become immortal."
Manit0u
Profile Blog Joined August 2004
Poland17782 Posts
Last Edited: 2015-02-14 23:58:55
February 14 2015 23:58 GMT
#11708
On February 15 2015 03:21 TMG26 wrote:
~Why not just use an IDE that has some vim integration?


I don't want to turn on the "vim mode" in my IDE because I know it won't be vim.
Time is precious. Waste it wisely.
Ben...
Profile Joined January 2011
Canada3485 Posts
Last Edited: 2015-02-15 00:31:42
February 15 2015 00:29 GMT
#11709
On February 15 2015 08:58 Manit0u wrote:
Show nested quote +
On February 15 2015 03:21 TMG26 wrote:
~Why not just use an IDE that has some vim integration?


I don't want to turn on the "vim mode" in my IDE because I know it won't be vim.

Indeed. Most attempts at vim-style commands in IDEs/non-native implementations of vim in other text editors fall pretty flat. Sublime Text's, even with plug-ins to make them better, still aren't as smooth as native vim. In most IDEs it's even worse. I seem to remember Eclipse's being fairly janky too.

One thing I have seen with some IDEs (in cases where it is even possible of course) is people replacing the default text editor with vim in the IDE. My buddy does that with Eclipse (not sure how, but he insists it's actual vim). It's too bad that type of behaviour in IDEs is seldom supported.

On the general topic of learning vim and going "back to basics" by doing almost everything from the command line, I'm all for it. A lot of people I work with both in and outside of class are stuck in the "I only use Visual Studio/Eclipse for everything and have no idea how to use make or compile things by hand" mode. I find you learn way more having to do things by hand, and once you get a hold of how things work at a lower level, you can work as fast or faster from the command line in many situations.
"Cliiiiiiiiiiiiiiiiide" -Tastosis
Cyx.
Profile Joined November 2010
Canada806 Posts
Last Edited: 2015-02-15 06:25:22
February 15 2015 06:09 GMT
#11710
On February 15 2015 09:29 Ben... wrote:
Show nested quote +
On February 15 2015 08:58 Manit0u wrote:
On February 15 2015 03:21 TMG26 wrote:
~Why not just use an IDE that has some vim integration?


I don't want to turn on the "vim mode" in my IDE because I know it won't be vim.

Indeed. Most attempts at vim-style commands in IDEs/non-native implementations of vim in other text editors fall pretty flat. Sublime Text's, even with plug-ins to make them better, still aren't as smooth as native vim. In most IDEs it's even worse. I seem to remember Eclipse's being fairly janky too.


I had a go at Eclipse's 'emacs mode' because I had to use Eclipse a couple months ago for a while... definitely a well-intentioned but tragically underpowered mode. Maybe I just didn't get that into it but it was just so hard to get it to feel like Emacs, things like the Eclipse autocomplete just get in the way and I end up typing things wrong more often than right =/

Not even getting started on the times I had to write C# for work and use VS... I kept hitting C-x C-s to save, which had the unfortunate effect of cutting the line I was working on then saving the file in a state I didn't want it to save in lol. I mean, all of these things are just familiarity things, and I know I could deal with them if I tried... but it seems *definitely* not worth the effort to me to use Emacs mode in any other editor, and they all kind of bother me in their default modes now
whotemp
Profile Joined June 2011
United States3 Posts
February 15 2015 08:32 GMT
#11711
Have you heard of Omnisharp? They claim to have added intellisense capabilities to vim/emacs or whatever else.

http://www.hanselman.com/blog/OmniSharpMakingCrossplatformNETARealityAndAPleasure.aspx
Millitron
Profile Blog Joined August 2010
United States2611 Posts
February 15 2015 18:23 GMT
#11712
Got a (hopefully quick) question. Is Python easily portable? Can I run the same Python executable on Mac, Windows, and Linux? How do all the different Linux builds affect this; will I be able to run the same stuff in Fedora as in Ubuntu?
Who called in the fleet?
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 15 2015 18:25 GMT
#11713
is my understanding of how java works correct here:

I have a class that has variable "int x =5". It also has a method that just says "x=10".

I create an arraylist. I make an instance of the class with the variables, I store the reference to it in the arraylist, position 0.

I make another instance of the class, and this time I call the method that changes x. I store the reference to it in the arraylist position 1.

Then my program does some other random stuff, it's irrelevant. Now I call up that array. I get position 0. I print reference.x. I call up position 1. print reference.x


Will it print 5, and 10?

If so, how does java know not to garbage collect my objects? And if not, how do I keep the objects around so that I can actually reference them from an arraylist?
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2015-02-15 18:35:22
February 15 2015 18:31 GMT
#11714
Yes it will print 5 and 10.

The garbage collector only deletes items that you can no longer access. When an item goes out of scope it will be collected by the garbage collector (eventually, the garbage isn't collected instantly). Your arraylist is still in scope so all the objects it holds are also still in scope and won't be collected.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Millitron
Profile Blog Joined August 2010
United States2611 Posts
February 15 2015 18:39 GMT
#11715
On February 16 2015 03:31 Blitzkrieg0 wrote:
Yes it will print 5 and 10.

The garbage collector only deletes items that you can no longer access. When an item goes out of scope it will be collected by the garbage collector (eventually, the garbage isn't collected instantly). Your arraylist is still in scope so all the objects it holds are also still in scope and won't be collected.

Further, int isn't a good example. It's a primitive that's stored literally. When you put x in an array, you're storing the value of x, not x. This is not true of more complex objects. Anything more complex than a primitive will store a reference in the array.
Who called in the fleet?
Manit0u
Profile Blog Joined August 2004
Poland17782 Posts
Last Edited: 2015-02-15 18:45:27
February 15 2015 18:43 GMT
#11716
On February 16 2015 03:23 Millitron wrote:
Got a (hopefully quick) question. Is Python easily portable? Can I run the same Python executable on Mac, Windows, and Linux? How do all the different Linux builds affect this; will I be able to run the same stuff in Fedora as in Ubuntu?


http://stackoverflow.com/questions/1883118/big-list-of-portability-in-python

It should be relatively easy to port if you adhere to few rules (not using system-specific modules, using system path separators, uniform newlines, making sure that size and endianess are correct etc.).
Time is precious. Waste it wisely.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2015-02-15 18:50:57
February 15 2015 18:49 GMT
#11717
ok thanks. regarding x being a primitive it doesn't matter right? I am still storing reference to the object not to x.


Alright I have a followup question, I figured what you guys said is the case.

What if, in the example I gave, my program wants to create many instances of that class with the variable "x". Over and over it wants to store instances of this class into the arraylist, sometimes where X = 5, and sometimes where X = 10. It wants a unique object each time, ignore that some of them hold the same value.

But how in the world would I write this code? I can't just make an instance of it with the same reference name over and over, because that name gets taken the first time it is stored in an arraylist. But I also can't reasonably write code in a way where I actually write out a new name for it every time I want a new instance if there is going to be like 100 of them.

I am almost sure you can't do it, but just to make sure.. you can't put a variable IN a name for something right? Like, I can't do myclass referencenameX = new myclass();
and have X be an int that is incrementing?

Is there any way to do something to that effect?
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2015-02-15 18:59:03
February 15 2015 18:57 GMT
#11718
If you're going to put them in an arraylist the smart way to do it would just be a for loop.

ArrayList myList = new ArrayList<MyObject>();
for (int i = 0; i < 100 ; i++) {
myList[i] = new MyObject();
if (i % 2 == 0)
myList[i].setX();
}


I don't need to name them all something since I'm going to be accessing them from the list structure and never use the name anyway.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Millitron
Profile Blog Joined August 2010
United States2611 Posts
February 15 2015 18:58 GMT
#11719
On February 16 2015 03:49 travis wrote:
ok thanks. regarding x being a primitive it doesn't matter right? I am still storing reference to the object not to x.

I'm am pretty sure, not 100% maybe like 90%, that you never really store a reference to an int, or any other primitive in Java.

On February 16 2015 03:49 travis wrote:
Alright I have a followup question, I figured what you guys said is the case.

What if, in the example I gave, my program wants to create many instances of that class with the variable "x". Over and over it wants to store instances of this class into the arraylist, sometimes where X = 5, and sometimes where X = 10. It wants a unique object each time, ignore that some of them hold the same value.

But how in the world would I write this code? I can't just make an instance of it with the same reference name over and over, because that name gets taken the first time it is stored in an arraylist. But I also can't reasonably write code in a way where I actually write out a new name for it every time I want a new instance if there is going to be like 100 of them.

I am almost sure you can't do it, but just to make sure.. you can't put a variable IN a name for something right? Like, I can't do myclass referencenameX = new myclass();
and have X be an int that is incrementing?

Is there any way to do something to that effect?

That's what the arraylist is for. Instead of having it be referencenameX for your variable, you array[x].
Who called in the fleet?
goody153
Profile Blog Joined April 2013
44280 Posts
February 15 2015 18:59 GMT
#11720
Any linux guru/user here ?

What are the best linux server OS that i should use if i am going to utilize lamp lamp ?
this is a quote
Prev 1 584 585 586 587 588 1032 Next
Please log in or register to reply.
Live Events Refresh
GSL
11:00
GSL CK #5 - Day 1
Ryung 387
SHIN 140
Classic114
CranKy Ducklings SOOP110
herO (SOOP)93
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko596
Ryung 387
SHIN 140
Classic 114
herO (SOOP) 93
Rex 45
RushiSC 5
Codebar 4
StarCraft: Brood War
Shuttle 2352
Jaedong 1517
Hyuk 991
Soulkey 615
Soma 557
firebathero 467
EffOrt 464
BeSt 440
Light 375
Mini 285
[ Show more ]
Larva 279
Snow 190
actioN 189
Zeus 163
ggaemo 156
Rush 98
ZerO 98
Pusan 83
hero 65
Sea.KH 58
[sc1f]eonzerg 57
ToSsGirL 44
Sharp 36
soO 33
Free 31
910 27
Barracks 24
scan(afreeca) 24
Bale 19
Aegong 18
sorry 16
Movie 15
Terrorterran 13
HiyA 13
IntoTheRainbow 11
Noble 11
Icarus 4
Dota 2
Gorgc4508
Dendi1330
XaKoH 849
Counter-Strike
kRYSTAL_66
Other Games
singsing2281
B2W.Neo777
Liquid`VortiX133
ZerO(Twitch)14
Organizations
Other Games
gamesdonequick27220
StarCraft 2
IntoTheiNu 1251
StarCraft: Brood War
UltimateBattle 1214
Other Games
BasetradeTV233
Dota 2
PGL Dota 2 - Main Stream140
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 14 non-featured ]
StarCraft 2
• LUISG 5
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota2130
League of Legends
• Nemesis3500
• TFBlade687
Upcoming Events
Replay Cast
10h 19m
WardiTV Weekly
21h 19m
PiGosaur Cup
1d 10h
The PondCast
1d 20h
Replay Cast
2 days
CrankTV Team League
2 days
Replay Cast
3 days
Replay Cast
3 days
CrankTV Team League
3 days
Replay Cast
4 days
[ Show More ]
RSL Revival
4 days
CranKy Ducklings
4 days
Afreeca Starleague
4 days
Snow vs Jaedong
YSC vs hero
RSL Revival
5 days
Sparkling Tuna Cup
5 days
GSL
6 days
Liquipedia Results

Completed

CSL Season 21: Qualifier 2
HSC XXIX
Eternal Conflict S2 E1

Ongoing

IPSL Spring 2026
Acropolis #4
YSL S3
CSL 2026 Summer (S21)
SCTL 2026 Spring
XSE Pro League 2026
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

Upcoming

Escore Tournament S3: W2
ASL Season 22:Wild Card Qualifier
CSLAN 4
Blizzard Classic Cup 2026
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E3
Eternal Conflict S2 E2
Heroes Pulsing #3
Logitech G Connect 2026
StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
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.