• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 13:53
CEST 19:53
KST 02:53
  • 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 HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
IntoTheTV X SOOP SC2 League : Weekly & Monthly4Clem: "I don't have that much hope in Blizzard"2ZeroSpace Early Access is Now Live!24Weekly Cups (July 13-19): Terran & Protoss rise; Zerg falters2Balance hotfix patch 5.0.16b (July 16)90
StarCraft 2
General
What's the best tug of war? Reynor: GSL Loss Wasn't About Preparation Format Balance hotfix patch 5.0.16b (July 16) How would you feel about frequent/monthly balance patches for SC2? Clem: "I don't have that much hope in Blizzard"
Tourneys
IntoTheTV X SOOP SC2 League : Weekly & Monthly INu's Battles#18 - Cure, herO, Rogue & ByuN RSL Revival: Season 6 - Qualifiers and Main Event Master Swan Open (Global Bronze-Master 2) WardiTV Summer Cup 2026
Strategy
[G] Having the right mentality to improve
Custom Maps
[M] (2) Industrial Park New Map Maker - Looking for Advice - Love or Hate
External Content
Mutation # 535 Assembly of Vengeance The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ ASL22 General Discussion BW General Discussion How Famous was FlaSh before his Debut? Animated Gateway
Tourneys
Escore Tournament - Season 3 Small VOD Thread 2.0 [Megathread] Daily Proleagues [IPSL] Spring 2026 Grand Finals - This Weekend!
Strategy
Simple Questions, Simple Answers PvT advise for noobs Fighting Spirit mining rates Creating a full chart of Zerg builds
Other Games
General Games
Path of Exile ZeroSpace Early Access is Now Live! General RTS Discussion Thread Nintendo Switch Thread Diablo IV
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread TL Mafia Power Rank NeO.D_StephenKing vs This Guy From 1 Million Dance Vanilla Mini Mafia
Community
General
US Politics Mega-thread Artificial Intelligence Thread Russo-Ukrainian War Thread How to buy a book - shipping from Korea to Europe The Games Industry And ATVI
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Anime Discussion Thread Series you have seen recently... Movie Discussion! [Req][Books] Good Fantasy/SciFi books
Sports
TeamLiquid Health and Fitness Initiative For 2023 2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 McBoner: A hockey love story
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Simple Questions Simple Answers FPS when play League Of Legend on laptop
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
How Games can Help with Majo…
TrAiDoS
Hello guys!
LIN1s
ASL S22 English Commentary…
namkraft
Poker (part 2)
Nebuchad
An Exploration of th…
waywardstrategy
Customize Sidebar...

Website Feedback

Closed Threads



Active: 3785 users

The Big Programming Thread - Page 502

Forum Index > General Forum
Post a Reply
Prev 1 500 501 502 503 504 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.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
July 23 2014 18:00 GMT
#10021
Logging is one of these odd things that are orthogonal to the normal architecture. Logging is needed almost everywhere, across all layers and boundaries. I suggest that you find some sources on how to provide logging in a clean, hopefully nonintrusive way and then decide which option fits your architecture best.
If you have a good reason to disagree with the above, please tell me. Thank you.
bakesale
Profile Blog Joined August 2008
United States187 Posts
July 23 2014 21:26 GMT
#10022
On July 23 2014 23:57 MelChizm wrote:
Show nested quote +
On July 23 2014 10:22 bakesale wrote:
On July 21 2014 19:14 MelChizm wrote:
What is the most the most efficient way in R to get values from a table. By which I mean I have a list of ID's, I have a table in which there is one column with each ID exactly once, and one column with the number that belongs to the ID. So now I want in my big list, with multiple occurences of the ID's, I want to add after each occurence the number from the table.

I use now lapply on the ID's and a function that indexes on the ID and returns the number, but I have the feeling this lapply function is not so efficient, it takes a long time to compute. Does somebody know a more efficient method?

dummy data:
ID
1
1
2
1
2
3
...

table
ID Number
1 384835
2 435393
3 239493
...

Can you clarify what the goal is? I think from what you've said, and using that sample data, that the output would be:

ID Number
1 384835
1 384835
2 435393
1 384835
2 435393
3 239493

Is that correct?


Yes Exactly, that is the result I am looking for.


Here you go:

> a
ID Number
1 1 384835
2 2 435393
3 3 239493
> b
ID
1 1
2 1
3 2
4 1
5 2
6 3
> b$Number <- a[b$ID, 2]
> b
ID Number
1 1 384835
2 1 384835
3 2 435393
4 1 384835
5 2 435393
6 3 239493
phar
Profile Joined August 2011
United States1080 Posts
July 24 2014 04:09 GMT
#10023
You might want to first ask why you need some parts of your code to know about the logging from other parts of your code.
Who after all is today speaking about the destruction of the Armenians?
Manit0u
Profile Blog Joined August 2004
Poland17800 Posts
Last Edited: 2014-07-24 06:08:52
July 24 2014 06:07 GMT
#10024
On July 24 2014 13:09 phar wrote:
You might want to first ask why you need some parts of your code to know about the logging from other parts of your code.


I think that's a good question. Usually you introduce logging for debugging and testing purposes. I don't think I've ever introduced code that would access the logs. Unless you consider saving object state logging...
Time is precious. Waste it wisely.
MelChizm
Profile Joined November 2010
Netherlands15 Posts
Last Edited: 2014-07-24 09:39:52
July 24 2014 09:19 GMT
#10025
On July 24 2014 06:26 bakesale wrote:
Show nested quote +
On July 23 2014 23:57 MelChizm wrote:
On July 23 2014 10:22 bakesale wrote:
On July 21 2014 19:14 MelChizm wrote:
What is the most the most efficient way in R to get values from a table. By which I mean I have a list of ID's, I have a table in which there is one column with each ID exactly once, and one column with the number that belongs to the ID. So now I want in my big list, with multiple occurences of the ID's, I want to add after each occurence the number from the table.

I use now lapply on the ID's and a function that indexes on the ID and returns the number, but I have the feeling this lapply function is not so efficient, it takes a long time to compute. Does somebody know a more efficient method?

dummy data:
ID
1
1
2
1
2
3
...

table
ID Number
1 384835
2 435393
3 239493
...

Can you clarify what the goal is? I think from what you've said, and using that sample data, that the output would be:

ID Number
1 384835
1 384835
2 435393
1 384835
2 435393
3 239493

Is that correct?


Yes Exactly, that is the result I am looking for.


Here you go:

> a
ID Number
1 1 384835
2 2 435393
3 3 239493
> b
ID
1 1
2 1
3 2
4 1
5 2
6 3
> b$Number <- a[b$ID, 2]
> b
ID Number
1 1 384835
2 1 384835
3 2 435393
4 1 384835
5 2 435393
6 3 239493


tnx it works!
boon2537
Profile Blog Joined October 2010
United States905 Posts
July 24 2014 20:21 GMT
#10026
Hey, guys. I'm a junior C.S. major student but I'm still a noob at everything.
My first language is python, then I learned some C++ and made some basic data structure with it, and after that I mostly use java. And now, I'm making simple Unity game for fun in C#.

To be more marketable, is it worth learning and getting good at C or should I just focus on C# and java? I feel besides optimizing systems, the benefit of being good at C is understanding low-level issues which most people wouldn't care. But, then again, I know nothing.

What do you guys think about this?
Manit0u
Profile Blog Joined August 2004
Poland17800 Posts
Last Edited: 2014-07-24 21:29:18
July 24 2014 21:27 GMT
#10027
C++ is sufficiently low-level for most of todays things. If you already know some C basics or intermediate concepts that should be good enough (as sometimes you'll get to see some pieces of code for high-level frameworks written in C and it's good to know what's going on under the hood). Unless you want to do stuff like programming drivers for small machines (heart pacers etc.) or work with system kernels - then you need deep knowledge of C.

It's really a question of what direction you want to take. It's definitely easier to find a job in high-level languages just because there are more offers (depends on the language though, there will be more offers for Java than Haskell or Scala). If you're just starting out and not really sure what direction to take I'd stick with Java because it is very widely used (this includes both Java SE and EE, especially the Spring framework and Hibernate, they're required in almost every single Java job I've seen so far) and start moving towards Scala when you feel a bit more confident. This way you'll have more job offers to choose from and getting this first job is the most important (each next job comes easier).
Time is precious. Waste it wisely.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2014-07-24 23:59:27
July 24 2014 23:58 GMT
#10028
--- Nuked ---
berated-
Profile Blog Joined February 2007
United States1134 Posts
Last Edited: 2014-07-25 00:57:21
July 25 2014 00:55 GMT
#10029
On July 25 2014 08:58 Nesserev wrote:
I don't remember where I read it, but I really liked the logic behind a certain author's thinking. He basically said to stay away from Java if you want to be competitive and marketable. I'll try to paraphrase what he said as best as possible, basically, it came down to:
Show nested quote +
There are a lot of Java jobs, also a lot of Java programmers. A decent portion of these programmers are one-trick java ponies, people that (almost exclusively) have programmed in Java, hobby programmers, etc.

Due to the nature of Java jobs (mostly just programming and software dev), and the Java language itself, the required skill level for Java jobs is generally not that high. They don't need a CS major, they just need a programmer, and there will probably be no practical difference between you or the next programmer in that line of work.

The problem is that, Java jobs attract a lot of people (including those one-trick ponies, because it's the only type of job that they can apply for) and almost all of those people are more than qualified for the job; there's almost no room to 'shine'. If you're going for a Java job, you can't be competitive, you'll just be the next one in line.

And well, outside of getting a job... there's no real use for Java. There's almost always a language that'll do it "better". And well, you can always apply for a Java job without knowing Java...

But let's get to the point:
If you really want to be competitive and marketable, knowing a certain language probably won't help you get any further. Your code and experience will. Get some prestige projects going, show a wide variety of interests, and go deep in a couple of projects. Use the right languages for every project, don't just swiss-knife your projects with Java.

For example: instead of using Unity and C# to make a game, why don't you pick up a simple media library, and code a game together from scratch, implement features like animations yourself??


I really don't understand anything about this post. At all. Don't learn the most sought after skill in programming? Don't learn a language that offers stable jobs than can pay $100000+. No use for java outside of the job? I suppose this conclusion is based on the fact that android is a fad.

From as stupid as the author (or your interpretation of the author) tries to make all the one trick ponies out to be, why wouldn't you go into the sector of the field? Should be a piece of cake to walk in and wipe the floor with them, since they're just hobbyist. It also seems contradictory that so many one trick ponies leave no place to shine, but then state that knowing a language won't help on getting the job. How are the one trick ponies shining if they only know a single language and that doesn't matter?

Maybe I'm just confused, is every person in this thread working for or applying to one of the biggest tech companies in the world?

Personally, I think so much of what you should be doing should be about the specifics of what you want in life. Where do you want to live? Different areas have different language demands. What type of work is going to keep you engaged? Do you like web dev, game dev, mobile development? Do you want to work for a big company or small company? If these questions lead you to wanting to work for a company that needs you to do a lot of prep work to get hired, then you should definitely do so to give you the best chance.

If all you want is a job, I'm thinking java isn't looking so shabby.
berated-
Profile Blog Joined February 2007
United States1134 Posts
Last Edited: 2014-07-25 00:57:43
July 25 2014 00:56 GMT
#10030
oops -- quote != edit. must be cause i'm a java dev
phar
Profile Joined August 2011
United States1080 Posts
July 25 2014 03:06 GMT
#10031
Don't obsess too much about being dedicated to a given language. Just learn good practices, most of it will transfer between languages. Any (sufficiently large*) company that is at all honest about its hiring practices is not going to turn you away simply because you haven't been using their language of choice. You can pick up a new language without much problem. Three of my best co-workers had never used the language they're currently using before joining, it's not an issue.

Also the idea that java programmers are one-trick ponies is ridiculous. Some of the best places to work in the world use java.

* this may not be the case for some smaller companies, because they may just not have the time & manpower to spend getting someone up to speed
Who after all is today speaking about the destruction of the Armenians?
broodbucket
Profile Joined July 2013
Australia963 Posts
July 25 2014 03:39 GMT
#10032
I'm writing a shell. Anyone have any advice on how to handle foreground/background processes? Pipes and redirection seem pretty easy.
Ben...
Profile Joined January 2011
Canada3485 Posts
July 25 2014 04:01 GMT
#10033
On July 25 2014 12:06 phar wrote:
Don't obsess too much about being dedicated to a given language. Just learn good practices, most of it will transfer between languages. Any (sufficiently large*) company that is at all honest about its hiring practices is not going to turn you away simply because you haven't been using their language of choice. You can pick up a new language without much problem. Three of my best co-workers had never used the language they're currently using before joining, it's not an issue.

Also the idea that java programmers are one-trick ponies is ridiculous. Some of the best places to work in the world use java.

* this may not be the case for some smaller companies, because they may just not have the time & manpower to spend getting someone up to speed

This is what all of the more senior devs (a couple who do hiring included. Yay for programming forums that are mostly populated with older people) I've talked to have said. They would much rather have a smart junior dev that they can teach if need be that doesn't know a language but demonstrates good programming practices than find someone who is knowledgeable but is stubborn or could cause issues (of course being smart and being knowledgeable are two different things). One said in particular that the things he looks for most when hiring are that someone shows that they can learn (and is open-minded enough to learn, doesn't have too much of an ego to take criticism, will take advice, etc.), and that they are personable (he said if he could see himself going for drinks or lunch with the person).
"Cliiiiiiiiiiiiiiiiide" -Tastosis
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
July 25 2014 06:07 GMT
#10034
--- Nuked ---
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2014-07-25 08:54:48
July 25 2014 08:11 GMT
#10035
Honestly how I look at it (I'm in 3rd year so ymmv) is that it's multitudes more important to be interested in what you're doing, and the programming language you become most familiar with is just what language you had to learn to pursue your interest. The advice I always give people who ask, is to think of something software-y they're interested in or just plain like, then find out how they can make it. Your marketability, and honestly your growth as a programmer is highly dependent on doing and making software things, and you're going to struggle at making those things if you're not as interested.

It's a bit different once you get a job, in that you can not be absolutely floored by the project but still enjoy the process, because while you're going to learn at a job, getting it done takes precedence, whereas with a project learning and having fun is the goal.

tldr; learning a language is secondary to making something you're interested in. What you are interested in will narrow and essentially choose your choice of languages. If you want to build embedded systems, learn C. If you want to build Android apps or monolithic enterprise systems learn Java. If you want to build a game, choose what kind of game you want and what you want to learn, every language has the resources available for that, choose Unity if you care more about making games than programming games. If you want to go into Microsoft's stack or build .net applications, learn C#. And so on and so forth.

However, if you want me to make a choice, I work at Microsoft so I'm going to say C# Java feels poorer in comparison
There is no one like you in the universe.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
July 25 2014 08:36 GMT
#10036
If anyone is familiar with MVVM, how would you approach dispatching tasks on the UI thread from the view model? I get lots of thread access exceptions that I solve with the dispatcher, but it requires me to make a static global variable which I'm always a bit iffy about.


Also still wondering about this,

http://blog.ploeh.dk/2010/02/03/ServiceLocatorisanAnti-Pattern/

I'm a bit confused as to what this guy is saying. The only thing that holds weight in my eyes is that your services are dependent on a service locator implementation and he doesn't even mention that. Do you guys understand/agree?
There is no one like you in the universe.
boon2537
Profile Blog Joined October 2010
United States905 Posts
July 25 2014 08:51 GMT
#10037
Based on the responses, I'm gonna stick with C# and java for now. I'll have to learn C for some of my classes anyway. I'm really enjoying Unity so far, as I'm more interested in making fun gameplay than creating a good engine from scratch. So my current side project's goal is to publish a kickass Unity game then.

Thanks for the responses guys :D
berated-
Profile Blog Joined February 2007
United States1134 Posts
July 25 2014 11:16 GMT
#10038
On July 25 2014 17:36 Blisse wrote:
Also still wondering about this,

Show nested quote +
http://blog.ploeh.dk/2010/02/03/ServiceLocatorisanAnti-Pattern/

I'm a bit confused as to what this guy is saying. The only thing that holds weight in my eyes is that your services are dependent on a service locator implementation and he doesn't even mention that. Do you guys understand/agree?


It feels to me that the author is trying to use the service locator problem to solve the wrong problems. In the java world, using OSGi or JNDI appear to me to be implementations of the service locator problem -- both of which are extremely strong and necessary tools. This isn't to say that because I found an example that the pattern is amazing and should be used all the time. Like languages, patterns cannot be applied to every situation and a perfect outcome be expected. There are times that one pattern is going to be better suited than another.

I do not understand the comments about intellisense or not knowing that you need dependencies. This feels to me to be more about good API design and documentation rather than a limitation of a pattern. If your library requires you to register something to a service locator, and then also register all of its dependencies...I'm starting to wonder what the point of hiding the service behind a locator is getting you.

From my perspective, the service locator pattern feels to me more about the boundaries of accessing an external modules rather than hiding your own code from yourself. Let some other complicated service declare its own dependencies and its own implementation while still providing a service who can execute a contract.

What's bizarre is if you read through the comments, the guy seems to be well spoken and know his stuff -- so I'm not sure as to why it feels like he's deliberately trolling on this post.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
July 25 2014 16:00 GMT
#10039
what do you guys use for energy refuel on those long days of intermittent productivity?
need to change up my banana and coffee regime.
conspired against by a confederacy of dunces.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2014-07-25 16:12:31
July 25 2014 16:07 GMT
#10040
--- Nuked ---
Prev 1 500 501 502 503 504 1032 Next
Please log in or register to reply.
Live Events Refresh
Big Brain Bouts
16:00
#123
Soulspirit vs goblin
TriGGeR vs Bunny
RotterdaM873
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 873
ProTech78
BRAT_OK 75
RushiSC 33
MindelVK 17
StarCraft: Brood War
ggaemo 168
Dewaltoss 139
Mong 113
Shine 67
Sharp 50
Hyun 41
Bale 34
JYJ 31
Rock 22
Aegong 21
[ Show more ]
Noble 17
IntoTheRainbow 16
NotJumperer 16
League of Legends
Trikslyr57
Counter-Strike
fl0m7045
Heroes of the Storm
KnowMe60
Other Games
singsing2132
Grubby1182
B2W.Neo587
TKL 251
C9.Mang0193
ArmadaUGS109
Liquid`VortiX84
CosmosSc2 83
JuggernautJason73
XaKoH 68
QueenE55
XcaliburYe50
UpATreeSC24
Rex13
SteadfastSC5
Organizations
StarCraft 2
TaKeTV 390
angryscii 17
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 16 non-featured ]
StarCraft 2
• StrangeGG 31
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• FirePhoenix10
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos1548
• Nemesis1267
Other Games
• imaqtpie320
• Shiphtur300
Upcoming Events
OSC
4h 8m
Replay Cast
6h 38m
Korean StarCraft League
9h 8m
Afreeca Starleague
10h 8m
RSL Revival
15h 8m
Serral vs SHIN
herO vs Solar
Online Event
21h 8m
RSL Revival
1d 15h
Clem vs ByuN
Rogue vs Lambo
OSC
1d 18h
WardiTV Weekly
2 days
Sparkling Tuna Cup
3 days
[ Show More ]
INu's Battles
3 days
Cure vs herO
ByuN vs Rogue
PiGosaur Cup
4 days
The PondCast
4 days
Kung Fu Cup
4 days
Patches Events
4 days
Replay Cast
5 days
CrankTV Team League
5 days
Replay Cast
6 days
CrankTV Team League
6 days
Liquipedia Results

Completed

Proleague 2026-07-22
HSC XXIX
Eternal Conflict S2 E3

Ongoing

CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
Escore Tournament S3: W4
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
BLAST Bounty Summer Qual
Stake Ranked Episode 3
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

Upcoming

ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
ASL Season 22: Qualifier #1
ASL Season 22: Qualifier #2
CSLAN 4
ASL Season 22
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
ESL Pro League Season 24
Stake Ranked Episode 4
Logitech G Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
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.