• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:30
CEST 18:30
KST 01:30
  • 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
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Weekly Cups (June 30 - July 6): Classic Doubles2[BSL20] Non-Korean Championship 4x BSL + 4x China8Flash Announces Hiatus From ASL66Weekly Cups (June 23-29): Reynor in world title form?14FEL Cracov 2025 (July 27) - $8000 live event22
StarCraft 2
General
The SCII GOAT: A statistical Evaluation The GOAT ranking of GOAT rankings Weekly Cups (June 23-29): Reynor in world title form? Weekly Cups (June 30 - July 6): Classic Doubles Program: SC2 / XSplit / OBS Scene Switcher
Tourneys
RSL: Revival, a new crowdfunded tournament series FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament WardiTV Mondays Korean Starcraft League Week 77
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
Flash Announces Hiatus From ASL SC uni coach streams logging into betting site BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ ASL20 Preliminary Maps
Tourneys
[BSL20] Grand Finals - Sunday 20:00 CET CSL Xiamen International Invitational [BSL20] Non-Korean Championship 4x BSL + 4x China The Casual Games of the Week Thread
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Stop Killing Games - European Citizens Initiative Summer Games Done Quick 2024! Summer Games Done Quick 2025!
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 633 users

The Big Programming Thread - Page 192

Forum Index > General Forum
Post a Reply
Prev 1 190 191 192 193 194 1031 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.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
November 13 2012 23:34 GMT
#3821
On November 14 2012 08:28 meatpudding wrote:
Show nested quote +
On November 14 2012 07:52 KaiserJohan wrote:
On November 13 2012 08:37 Nausea wrote:
Okay so I started writing this assetmanager singleton class, with a map storing a string and an image. The problem is that the image is stored as a pointer in the map and adding it to the map is going fine, however when i try to get the function to return the pointer the compiler does not complain but the program shuts down when the pointer is returned as NULL.

Help! :/


NVM I solved it, I tried doing it->second, and instead I now did ImagesList.find(filename)->second

that did the trick. Thank you all for your help


Now I'm mainly speaking from a C++ perspective but:
Drop the singleton design, instead build your system in such a way as to avoid globals as much as absolutely possible. It forces you to think and create healthy software design, because sooner or later the singleton and stuff like it will bite you. Your object should have a clear purpose and their scope and visibility as limited as possible and also avoid coupling between systems.



I would like to ask how you suggest doing this?

Imagine different Entity types need access to the AssetManager. With globals or singleton you can do something like this (Assume myImage is inherit from Entity and myImageResourceName identifies the unique resource)


// For the projectile class
void Projectile::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}

// For the shrubbery class
void Shrubbery::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}



How would you avoid AssetManager being global in this case?


Don't know which language, so pseudocode:

Projectile::constructor(AssetManager am) { this,assetManager = am; }
Projectile::Load() { this,assetManager.GetResource(imageName); }
NukeTheBunnys
Profile Joined July 2010
United States1004 Posts
November 14 2012 00:21 GMT
#3822
I love hearing people blindly saying you should not use globals. Its one of those things that gets taught in schools and blindly accepted. Globals are fine when used correctly, people are taught not to use them because they present some risk to maintainability especially when they are used in the wrong context.

As for your loading problem, this is a poor case to do lazy loading. If you are running your game loop and you need a resource for the first time you do not want to incur the cost of going to disk to load it because it would make your frame drop and make the controls feel inconstant/lagy. This is why games have loading times at the start of a level, they are pulling all the resources into memory ahead of time so they do not have to take that hit in the middle of game play.

That all being said you also have to consider the total memory foot print of your program. This is a very complicated topic, but overly simplified: you want it as small as possible. For this reason only load what you need into memory at the start of a level, and unload it when it is no longer needed.
When you play the game of drones you win or you die.
Kich
Profile Joined April 2011
United States339 Posts
Last Edited: 2012-11-14 00:32:44
November 14 2012 00:29 GMT
#3823
On November 14 2012 07:52 KaiserJohan wrote:
Show nested quote +
On November 13 2012 08:37 Nausea wrote:
Okay so I started writing this assetmanager singleton class, with a map storing a string and an image. The problem is that the image is stored as a pointer in the map and adding it to the map is going fine, however when i try to get the function to return the pointer the compiler does not complain but the program shuts down when the pointer is returned as NULL.

Help! :/


NVM I solved it, I tried doing it->second, and instead I now did ImagesList.find(filename)->second

that did the trick. Thank you all for your help


Now I'm mainly speaking from a C++ perspective but:
Drop the singleton design, instead build your system in such a way as to avoid globals as much as absolutely possible. It forces you to think and create healthy software design, because sooner or later the singleton and stuff like it will bite you. Your object should have a clear purpose and their scope and visibility as limited as possible and also avoid coupling between systems.



Singletons are perfectly fine, you just need to legitimately understand how to use them. If anything, for a side project, it's probably better he experiences the first hand the limitations and requirements of using the singleton pattern.

Anyways, to post a general question:

I am looking to start learning Objective C for iPad development, but I am not thrilled about Apple's tutorials for this (I'd really rather not spend 8 hours dragging and dropping things), does anyone have a suggestion for a good place to start learning?
AcTiVillain
Profile Joined November 2010
Australia81 Posts
November 14 2012 01:09 GMT
#3824
On November 12 2012 14:24 ninjamyst wrote:
I am currently a Software Architect at a mid-size Healthcare IT firm. Straight out of college, we pay $55-$60k. 2-3 years of experience will get you $75-$85k. 4-6 years of experience, you are looking at $90-$110k. That doesn't include year-end bonus of $5-$20k. This is in a major city, and we primarily use Microsoft technology....so C#, ASP.NET, SQL Server 2008, etc. We don't care if you memorized definitions, and we dont give you stupid brain teasers during our interviews. We hire based on your problem solving skills and your object oriented design experiences. We will ask you to take a simple every day concept and break it down into classes/methods/properties. For example, how would you represent a baseball game in code? We dont hire specifically for front end vs database vs business logic. As part of our small development team, you will do all of those things. You will learn how to create GUI, how to create business objects, how to maintain databases.

For those of you in college now, the best way to impress is to be involved in side projects outside of school. Most schools don't even teach C# or PHP or Ruby; they only teach Java or C++. When we look at college resumes, everyone takes the same classes, do the same senior projects, and etc. We look for people that wrote their own mobile app, engaged in engineering competitions, did side projects for fun, learned a language outside of class, and etc.

Most importantly, we look for people with strong communication skills. Too often, we get people obsessed with technical stuff only, and they lack social skills. In a team environment, you need to be able to express your ideas to your peers. In design sessions, you need to be able to clearly explain your logic and your reasoning. If we can't understand you, we can't hire you even if you can create the fastest algorithm.


That sounds amazeballs.

I did make an iphone game during my time at Uni and do some extra cirricular volunteer work though. You think that warrants a $50k Salary?
Craton
Profile Blog Joined December 2009
United States17247 Posts
November 14 2012 01:46 GMT
#3825
It could.

YMMV.
twitch.tv/cratonz
tec27
Profile Blog Joined June 2004
United States3696 Posts
November 14 2012 04:09 GMT
#3826
On November 14 2012 09:21 NukeTheBunnys wrote:
I love hearing people blindly saying you should not use globals. Its one of those things that gets taught in schools and blindly accepted. Globals are fine when used correctly, people are taught not to use them because they present some risk to maintainability especially when they are used in the wrong context.

Its not so much maintainability as it is testability where globals cause issues. It is much better for testing to explicitly specify what your class' dependencies are and pass them in, than for a class to assume that a global variable of a specific type is set and initialized properly and utilize that (and in many cases having a global dependency makes it hard/impossible to replace with a stubbed version of the dependency). It also makes your code flow and initialization of objects much more straight-forward and easy to follow. Yes, they're fine when used in the right situations, but there are very few situations where that's the case.
Can you jam with the console cowboys in cyberspace?
AcTiVillain
Profile Joined November 2010
Australia81 Posts
November 14 2012 04:23 GMT
#3827
On November 14 2012 13:09 tec27 wrote:
Show nested quote +
On November 14 2012 09:21 NukeTheBunnys wrote:
I love hearing people blindly saying you should not use globals. Its one of those things that gets taught in schools and blindly accepted. Globals are fine when used correctly, people are taught not to use them because they present some risk to maintainability especially when they are used in the wrong context.

Its not so much maintainability as it is testability where globals cause issues. It is much better for testing to explicitly specify what your class' dependencies are and pass them in, than for a class to assume that a global variable of a specific type is set and initialized properly and utilize that (and in many cases having a global dependency makes it hard/impossible to replace with a stubbed version of the dependency). It also makes your code flow and initialization of objects much more straight-forward and easy to follow. Yes, they're fine when used in the right situations, but there are very few situations where that's the case.


I agree, Globals make unit testing trickier. Avoid if you can, but use them if you need a quickfix.
frogmelter
Profile Blog Joined April 2009
United States971 Posts
November 14 2012 04:26 GMT
#3828
I was asked this question for an interview and I've been wondering about it for a few weeks.

Rank each device from highest electricity consumption to lowest.

Normal Hard Drive, SSD, USB Flash Drive, RAM

My order of ranking and reasoning:

1) Hard Drive - has to spin at thousands of RPM
2) SSD - Bigger than the other two smaller components of memory [RAM and USB]
3) USB Flash Drive - A usb port can supply up to 5v iirc?
4) Ram - Takes like... 1.5v?

I'm not sure about the last two. Does a USB drive take more electricity or RAM?
TL+ Member
chaokel
Profile Blog Joined October 2010
Australia535 Posts
Last Edited: 2012-11-14 04:59:00
November 14 2012 04:57 GMT
#3829
On November 14 2012 08:34 Morfildur wrote:
Show nested quote +
On November 14 2012 08:28 meatpudding wrote:
On November 14 2012 07:52 KaiserJohan wrote:
On November 13 2012 08:37 Nausea wrote:
Okay so I started writing this assetmanager singleton class, with a map storing a string and an image. The problem is that the image is stored as a pointer in the map and adding it to the map is going fine, however when i try to get the function to return the pointer the compiler does not complain but the program shuts down when the pointer is returned as NULL.

Help! :/


NVM I solved it, I tried doing it->second, and instead I now did ImagesList.find(filename)->second

that did the trick. Thank you all for your help


Now I'm mainly speaking from a C++ perspective but:
Drop the singleton design, instead build your system in such a way as to avoid globals as much as absolutely possible. It forces you to think and create healthy software design, because sooner or later the singleton and stuff like it will bite you. Your object should have a clear purpose and their scope and visibility as limited as possible and also avoid coupling between systems.



I would like to ask how you suggest doing this?

Imagine different Entity types need access to the AssetManager. With globals or singleton you can do something like this (Assume myImage is inherit from Entity and myImageResourceName identifies the unique resource)


// For the projectile class
void Projectile::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}

// For the shrubbery class
void Shrubbery::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}



How would you avoid AssetManager being global in this case?


Don't know which language, so pseudocode:

Projectile::constructor(AssetManager am) { this,assetManager = am; }
Projectile::Load() { this,assetManager.GetResource(imageName); }


Is this not almost exactly how a singleton works?

You create an instance of it once, assign the this pointer and from then on whenever it constructs it just uses the pointer? Am i missing something here?
tec27
Profile Blog Joined June 2004
United States3696 Posts
November 14 2012 05:47 GMT
#3830
On November 14 2012 13:57 chaokel wrote:
Show nested quote +
On November 14 2012 08:34 Morfildur wrote:
On November 14 2012 08:28 meatpudding wrote:
On November 14 2012 07:52 KaiserJohan wrote:
On November 13 2012 08:37 Nausea wrote:
Okay so I started writing this assetmanager singleton class, with a map storing a string and an image. The problem is that the image is stored as a pointer in the map and adding it to the map is going fine, however when i try to get the function to return the pointer the compiler does not complain but the program shuts down when the pointer is returned as NULL.

Help! :/


NVM I solved it, I tried doing it->second, and instead I now did ImagesList.find(filename)->second

that did the trick. Thank you all for your help


Now I'm mainly speaking from a C++ perspective but:
Drop the singleton design, instead build your system in such a way as to avoid globals as much as absolutely possible. It forces you to think and create healthy software design, because sooner or later the singleton and stuff like it will bite you. Your object should have a clear purpose and their scope and visibility as limited as possible and also avoid coupling between systems.



I would like to ask how you suggest doing this?

Imagine different Entity types need access to the AssetManager. With globals or singleton you can do something like this (Assume myImage is inherit from Entity and myImageResourceName identifies the unique resource)


// For the projectile class
void Projectile::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}

// For the shrubbery class
void Shrubbery::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}



How would you avoid AssetManager being global in this case?


Don't know which language, so pseudocode:

Projectile::constructor(AssetManager am) { this,assetManager = am; }
Projectile::Load() { this,assetManager.GetResource(imageName); }


Is this not almost exactly how a singleton works?

You create an instance of it once, assign the this pointer and from then on whenever it constructs it just uses the pointer? Am i missing something here?

The end result is the same in this case, but the benefit to this approach is that its far more testable. If you need to test the Projectile class you can create whatever sort of AssetManager suits your testcase (a mock, one that loads things from memory instead of disk, etc.). In the actual game, you can utilize a different one. If you use a singleton approach, you've coupled your Projectile class to whatever AssetManager type it creates, and this obviously makes unit testing harder and makes your underlying types harder to switch around down the road. In general you should prefer to pass dependencies in rather than creating them within each dependent class (although this applies to everything, not just singletons).
Can you jam with the console cowboys in cyberspace?
chaokel
Profile Blog Joined October 2010
Australia535 Posts
November 14 2012 06:00 GMT
#3831
Ohhh that makes a lot of sense, thanks!
scudst0rm
Profile Joined May 2010
Canada1149 Posts
November 14 2012 06:36 GMT
#3832
On November 14 2012 13:26 frogmelter wrote:
I was asked this question for an interview and I've been wondering about it for a few weeks.

Rank each device from highest electricity consumption to lowest.

Normal Hard Drive, SSD, USB Flash Drive, RAM

My order of ranking and reasoning:

1) Hard Drive - has to spin at thousands of RPM
2) SSD - Bigger than the other two smaller components of memory [RAM and USB]
3) USB Flash Drive - A usb port can supply up to 5v iirc?
4) Ram - Takes like... 1.5v?

I'm not sure about the last two. Does a USB drive take more electricity or RAM?


voltage isn't a great indicator of power consumption. power = voltage * current, so your only getting half of the equation. Also it really depends whether your talking about average power during normal use or while stressing the device with reads/writes.

The actual numbers are something like:
RAM ~ 10W per stick
HDD ~ 10W
SDD ~ 1W
USB <1W
You're like a one ranger army comin' at me...
nunez
Profile Blog Joined February 2011
Norway4003 Posts
November 14 2012 09:23 GMT
#3833
On November 14 2012 08:28 meatpudding wrote:
Show nested quote +
On November 14 2012 07:52 KaiserJohan wrote:
On November 13 2012 08:37 Nausea wrote:
Okay so I started writing this assetmanager singleton class, with a map storing a string and an image. The problem is that the image is stored as a pointer in the map and adding it to the map is going fine, however when i try to get the function to return the pointer the compiler does not complain but the program shuts down when the pointer is returned as NULL.

Help! :/


NVM I solved it, I tried doing it->second, and instead I now did ImagesList.find(filename)->second

that did the trick. Thank you all for your help


Now I'm mainly speaking from a C++ perspective but:
Drop the singleton design, instead build your system in such a way as to avoid globals as much as absolutely possible. It forces you to think and create healthy software design, because sooner or later the singleton and stuff like it will bite you. Your object should have a clear purpose and their scope and visibility as limited as possible and also avoid coupling between systems.



I would like to ask how you suggest doing this?

Imagine different Entity types need access to the AssetManager. With globals or singleton you can do something like this (Assume myImage is inherit from Entity and myImageResourceName identifies the unique resource)


// For the projectile class
void Projectile::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}

// For the shrubbery class
void Shrubbery::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}



How would you avoid AssetManager being global in this case?


of the top of my mind you could use a template for assetmanager.
conspired against by a confederacy of dunces.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
November 14 2012 11:52 GMT
#3834
On November 14 2012 13:57 chaokel wrote:
Show nested quote +
On November 14 2012 08:34 Morfildur wrote:
On November 14 2012 08:28 meatpudding wrote:
On November 14 2012 07:52 KaiserJohan wrote:
On November 13 2012 08:37 Nausea wrote:
Okay so I started writing this assetmanager singleton class, with a map storing a string and an image. The problem is that the image is stored as a pointer in the map and adding it to the map is going fine, however when i try to get the function to return the pointer the compiler does not complain but the program shuts down when the pointer is returned as NULL.

Help! :/


NVM I solved it, I tried doing it->second, and instead I now did ImagesList.find(filename)->second

that did the trick. Thank you all for your help


Now I'm mainly speaking from a C++ perspective but:
Drop the singleton design, instead build your system in such a way as to avoid globals as much as absolutely possible. It forces you to think and create healthy software design, because sooner or later the singleton and stuff like it will bite you. Your object should have a clear purpose and their scope and visibility as limited as possible and also avoid coupling between systems.



I would like to ask how you suggest doing this?

Imagine different Entity types need access to the AssetManager. With globals or singleton you can do something like this (Assume myImage is inherit from Entity and myImageResourceName identifies the unique resource)


// For the projectile class
void Projectile::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}

// For the shrubbery class
void Shrubbery::Load()
{
myImage = AssetManager::GetSingleton().GetResource(myImageResourceName);
}



How would you avoid AssetManager being global in this case?


Don't know which language, so pseudocode:

Projectile::constructor(AssetManager am) { this,assetManager = am; }
Projectile::Load() { this,assetManager.GetResource(imageName); }


Is this not almost exactly how a singleton works?

You create an instance of it once, assign the this pointer and from then on whenever it constructs it just uses the pointer? Am i missing something here?


No. It's called dependency injection.
http://en.wikipedia.org/wiki/Dependency_Injection

For example if you want to write a unit test, you can pass a derived class of the AssetManager - e.g. a TestAssetManager - and then your class will use that instead. Your program can also use different asset managers that all inherit from the AssetManager class without your Projectile class having to know about that.
fabiano
Profile Blog Joined August 2009
Brazil4644 Posts
November 14 2012 12:47 GMT
#3835
Interesting discussion, makes one learn something new

Maybe if he wrote something like this:

[image loading]


or does this design implies into some kind of difficulty?
"When the geyser died, a probe came out" - SirJolt
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
November 14 2012 12:55 GMT
#3836
On November 14 2012 21:47 fabiano wrote:
Interesting discussion, makes one learn something new

Maybe if he wrote something like this:

[image loading]


or does this design implies into some kind of difficulty?


It's basically the same, except it uses an explicit interface for the AssetManager. C++ has no notion of Interfaces so it boils down to the same code.
heishe
Profile Blog Joined June 2009
Germany2284 Posts
Last Edited: 2012-11-14 13:01:26
November 14 2012 12:59 GMT
#3837
On November 14 2012 13:09 tec27 wrote:
Show nested quote +
On November 14 2012 09:21 NukeTheBunnys wrote:
I love hearing people blindly saying you should not use globals. Its one of those things that gets taught in schools and blindly accepted. Globals are fine when used correctly, people are taught not to use them because they present some risk to maintainability especially when they are used in the wrong context.

Its not so much maintainability as it is testability where globals cause issues. It is much better for testing to explicitly specify what your class' dependencies are and pass them in, than for a class to assume that a global variable of a specific type is set and initialized properly and utilize that (and in many cases having a global dependency makes it hard/impossible to replace with a stubbed version of the dependency). It also makes your code flow and initialization of objects much more straight-forward and easy to follow. Yes, they're fine when used in the right situations, but there are very few situations where that's the case.


The real problem with globals and singletons (which are used like globals, as opposed to their namesake, which can be handled by factories just as well) is that they solve a problem that shouldn't exist in the first place.

All that globals solve is lazyness (too lazy to pass around one extra parameter in functions that need access to the global), while providing no additional advantages, outside of a few ridiculously limited side cases (e.g. programs where the additional push to the stack in a function call for the extra parameter actually has a measurable effect on performance, which is almost never the case).

On the other hand, they introduce a lot of downsides in the long term. There is not a production code in the world that has been handled by more than one or two people over a timespan of more than a year, where globals or singletons haven't caused some sort of problem (even if it's miniscule) or made some refactoring necessary down the line. They fuck up unit tests, introduce problems with parallelism (especially pure globals), introduce opaque dependencies, etc.

And again, literally all they solve is lazyness. There's nothing that a global or singleton can do, that you can't do by passing stuff around in parameters.

The reason that universities and schools blindly teach you "don't use globals" is because it's true: You shouldn't. If you're lucky, the global/singleton will be equally as good as the solution without. But it's never better, and often times worse. So just don't use them.
If you value your soul, never look into the eye of a horse. Your soul will forever be lost in the void of the horse.
supereddie
Profile Joined March 2011
Netherlands151 Posts
November 14 2012 17:08 GMT
#3838
Instead of Dependency Injection by using constructor injection, you could also use the Service Locator pattern. They kind-of achieve the same thing: decoupling your classes from concrete implementations.

A C# example:

// somewhere during program startup
ServiceLocator.Register<IAssetManager>(new AssetManager());

// Consumer
IAssetManager am = ServiceLocator.Resolve<IAssetManager>();
am.GetResource(myImageResourceName);
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
white_horse
Profile Joined July 2010
1019 Posts
Last Edited: 2012-11-14 17:43:56
November 14 2012 17:43 GMT
#3839
On November 12 2012 14:24 ninjamyst wrote:
I am currently a Software Architect at a mid-size Healthcare IT firm. Straight out of college, we pay $55-$60k. 2-3 years of experience will get you $75-$85k. 4-6 years of experience, you are looking at $90-$110k. That doesn't include year-end bonus of $5-$20k. This is in a major city, and we primarily use Microsoft technology....so C#, ASP.NET, SQL Server 2008, etc. We don't care if you memorized definitions, and we dont give you stupid brain teasers during our interviews. We hire based on your problem solving skills and your object oriented design experiences. We will ask you to take a simple every day concept and break it down into classes/methods/properties. For example, how would you represent a baseball game in code? We dont hire specifically for front end vs database vs business logic. As part of our small development team, you will do all of those things. You will learn how to create GUI, how to create business objects, how to maintain databases.

For those of you in college now, the best way to impress is to be involved in side projects outside of school. Most schools don't even teach C# or PHP or Ruby; they only teach Java or C++. When we look at college resumes, everyone takes the same classes, do the same senior projects, and etc. We look for people that wrote their own mobile app, engaged in engineering competitions, did side projects for fun, learned a language outside of class, and etc.

Most importantly, we look for people with strong communication skills. Too often, we get people obsessed with technical stuff only, and they lack social skills. In a team environment, you need to be able to express your ideas to your peers. In design sessions, you need to be able to clearly explain your logic and your reasoning. If we can't understand you, we can't hire you even if you can create the fastest algorithm.


How hard is it to learn SQL, PHP, C# after you learn C++? I'm an intermediate c++ programmer. It looks like it would be easier since you know a little bit about programming already.
Translator
Abductedonut
Profile Blog Joined December 2010
United States324 Posts
November 14 2012 22:48 GMT
#3840
On November 15 2012 02:43 white_horse wrote:
Show nested quote +
On November 12 2012 14:24 ninjamyst wrote:
I am currently a Software Architect at a mid-size Healthcare IT firm. Straight out of college, we pay $55-$60k. 2-3 years of experience will get you $75-$85k. 4-6 years of experience, you are looking at $90-$110k. That doesn't include year-end bonus of $5-$20k. This is in a major city, and we primarily use Microsoft technology....so C#, ASP.NET, SQL Server 2008, etc. We don't care if you memorized definitions, and we dont give you stupid brain teasers during our interviews. We hire based on your problem solving skills and your object oriented design experiences. We will ask you to take a simple every day concept and break it down into classes/methods/properties. For example, how would you represent a baseball game in code? We dont hire specifically for front end vs database vs business logic. As part of our small development team, you will do all of those things. You will learn how to create GUI, how to create business objects, how to maintain databases.

For those of you in college now, the best way to impress is to be involved in side projects outside of school. Most schools don't even teach C# or PHP or Ruby; they only teach Java or C++. When we look at college resumes, everyone takes the same classes, do the same senior projects, and etc. We look for people that wrote their own mobile app, engaged in engineering competitions, did side projects for fun, learned a language outside of class, and etc.

Most importantly, we look for people with strong communication skills. Too often, we get people obsessed with technical stuff only, and they lack social skills. In a team environment, you need to be able to express your ideas to your peers. In design sessions, you need to be able to clearly explain your logic and your reasoning. If we can't understand you, we can't hire you even if you can create the fastest algorithm.


How hard is it to learn SQL, PHP, C# after you learn C++? I'm an intermediate c++ programmer. It looks like it would be easier since you know a little bit about programming already.


It's not hard, but every language has small details that don't exist in other languages. For example, PHP has a foreach loop that does not exist in C++ ( it might in the latest version of C++... not sure).

The only languages that are going to be difficult after C++ are:
- Assembly
- C (Because C++ programmers don't know anything about C, but think they do)
- Functional Programming languages like Scheme.
- HDL languages like Verilog and VHDL ( but these can be irrelevant)
Prev 1 190 191 192 193 194 1031 Next
Please log in or register to reply.
Live Events Refresh
RotterdaM Event
16:00
Rotti Stream Rumble 4k Edition
RotterdaM443
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 762
RotterdaM 443
Hui .357
MaxPax 334
StarCraft: Brood War
Bisu 1941
EffOrt 1308
Flash 1304
Jaedong 1180
Hyuk 821
Stork 371
actioN 369
Soulkey 276
Soma 275
Snow 187
[ Show more ]
firebathero 175
Mind 98
JulyZerg 71
TY 69
sSak 64
Barracks 57
Sharp 50
JYJ46
Terrorterran 45
PianO 43
Rock 31
HiyA 21
Aegong 20
soO 16
yabsab 15
GoRush 11
Shine 8
IntoTheRainbow 7
Dota 2
Gorgc6615
qojqva3321
League of Legends
singsing2289
Dendi1253
Counter-Strike
fl0m1143
markeloff176
Super Smash Bros
Mew2King204
Other Games
hiko1544
Beastyqt844
ceh9366
Lowko307
crisheroes263
ArmadaUGS149
KnowMe140
Trikslyr62
Organizations
Other Games
gamesdonequick47269
StarCraft 2
angryscii 21
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Reevou 7
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Michael_bg 2
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis6915
• TFBlade833
• Jankos802
Other Games
• Shiphtur316
Upcoming Events
Replay Cast
7h 30m
Sparkling Tuna Cup
17h 30m
WardiTV European League
23h 30m
MaNa vs sebesdes
Mixu vs Fjant
ByuN vs HeRoMaRinE
ShoWTimE vs goblin
Gerald vs Babymarine
Krystianer vs YoungYakov
PiGosaur Monday
1d 7h
The PondCast
1d 17h
WardiTV European League
1d 19h
Jumy vs NightPhoenix
Percival vs Nicoract
ArT vs HiGhDrA
MaxPax vs Harstem
Scarlett vs Shameless
SKillous vs uThermal
uThermal 2v2 Circuit
1d 23h
Replay Cast
2 days
RSL Revival
2 days
ByuN vs SHIN
Clem vs Reynor
Replay Cast
3 days
[ Show More ]
RSL Revival
3 days
Classic vs Cure
FEL
3 days
RSL Revival
4 days
FEL
4 days
FEL
4 days
BSL20 Non-Korean Champi…
5 days
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
Sparkling Tuna Cup
5 days
RSL Revival
5 days
FEL
5 days
BSL20 Non-Korean Champi…
6 days
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
Liquipedia Results

Completed

BSL Season 20
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
CSL Xiamen Invitational
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #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 © 2025 TLnet. All Rights Reserved.