• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:39
CEST 18:39
KST 01:39
  • 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
TL.net Map Contest #22 - Voting1Code S Season 2 (2026) - RO8 Preview4[ASL21] Finals Preview: Two Legacies21Code S Season 2 (2026) - RO12 Preview2herO wins GSL Code S Season 1 (2026)7
Community News
StarCraft II 5.0.16 PTR Patch Notes may 26th57Weekly Cups (May 18-25): MaxPax wins doubles0Crank Gathers Season 4: BW vs SC2 Team League4Weekly Cups (May 11-17): Classic wins double0Code S Season 1 (2026) - RO8 Results2
StarCraft 2
General
StarCraft II 5.0.16 PTR Patch Notes may 26th Changing from 12 to 8 is just asking for StarCraft TL.net Map Contest #22 - Voting herO wins GSL Code S Season 1 (2026) Code S Season 2 (2026) - RO8 Preview
Tourneys
GSL Code S Season 2 (2026) Sparkling Tuna Cup - Weekly Open Tournament Crank Gathers Season 4: BW vs SC2 Team League GSL Code S Season 1 (2026) Maestros of The Game 2 announcement and schedule !
Strategy
[G] Having the right mentality to improve
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players
External Content
Welcome to the External Content forum Mutation # 527 Hell Train The PondCast: SC2 News & Results Mutation # 526 Rubber and Glue
Brood War
General
VPN experiences Quality of life changes in BW that you will like ? Pros React To: ASL S21 Finals Every Matchup's Top 5 Winrates (all ASLs & KSLs) BW General Discussion
Tourneys
[ASL21] Grand Finals Escore Tournament StarCraft Season 2 [BSL22] WB Final & LB Semis - Saturday 21:00 CEST Small VOD Thread 2.0
Strategy
Any training maps people recommend? Muta micro map competition [G] Hydra ZvZ: An Introduction Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Tiranga Gaming Color Prediction ZeroSpace Megathread Stormgate/Frost Giant Megathread Path of Exile
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Trading/Investing Thread Dating: How's your luck?
Fan Clubs
The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books
Sports
McBoner: A hockey love story 2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Facing Challenges in Mobile App Development
TL Community
The Automated Ban List
Blogs
Customization Drives Loyalty…
TrAiDoS
Why RTS gamers make better f…
gosubay
ramps on octagon
StaticNine
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2261 users

The Big Programming Thread - Page 694

Forum Index > General Forum
Post a Reply
Prev 1 692 693 694 695 696 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.
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
December 16 2015 07:03 GMT
#13861
On December 16 2015 14:00 Shenghi wrote:
Show nested quote +
On December 16 2015 02:07 WarSame wrote:
I've been doing some work on the number of different ways to make change, and I've almost got it working properly and running extremely fast, but got a strange bug - for a coin denomination it will run it with the max of that coin, then skip the second most possible and go straight to the third and on. I have no idea why, and can't seem to bug hunt it.

The code is here.

coinDenoms is a global variable.

This outputs + Show Spoiler +
There are 30 different solutions.
2 0 0 0
0 5 0 0
0 3 4 0
0 3 2 10
0 3 1 15
0 3 0 20
0 2 6 0
0 2 4 10
0 2 3 15
0 2 2 20
0 2 1 25
0 2 0 30
0 1 8 0
0 1 6 10
0 1 5 15
0 1 4 20
0 1 3 25
0 1 2 30
0 1 1 35
0 1 0 40
0 0 10 0
0 0 8 10
0 0 7 15
0 0 6 20
0 0 5 25
0 0 4 30
0 0 3 35
0 0 2 40
0 0 1 45
0 0 0 50
As you can see, it goes straight from 2 quarters to 0 - and I have no idea why. If you can point it out to me I'd appreciate it.

Do you have the full code, so we can just paste it into an editor and it it works, without having to piece things together? That makes it a lot easier to help. =]

Also, I asked this before (but not in a post that directly quoted you) and it's a very important difference: Is the question how many ways there are to make change, or which ways there are? This is important because if you take common coin denominations (1, 2, 5, 10, 25, 50, 100, 200), there are over 5 000 000 ways to change 500 cents and over 260 000 000 ways to change 1000 cents. While it's extremely easy to calculate how many ways there are, even for values much larger, it quickly become infeasible and slightly later impossible to determine which ways there are.

Sorry, there's a lot of posts in here so I must have missed yours. The full code is here. There are 2 classes - my main and the used class.

I want to show each way to make change one time - so a list of the coin combinations. Even for my relatively efficient current code, going to 1000 cents slows to a crawl. Is it that much faster if you're just counting number of ways to do it?
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Shenghi
Profile Joined August 2010
167 Posts
Last Edited: 2015-12-16 10:57:36
December 16 2015 08:31 GMT
#13862
On December 16 2015 16:03 WarSame wrote:
Show nested quote +
On December 16 2015 14:00 Shenghi wrote:
On December 16 2015 02:07 WarSame wrote:
I've been doing some work on the number of different ways to make change, and I've almost got it working properly and running extremely fast, but got a strange bug - for a coin denomination it will run it with the max of that coin, then skip the second most possible and go straight to the third and on. I have no idea why, and can't seem to bug hunt it.

The code is here.

coinDenoms is a global variable.

This outputs + Show Spoiler +
There are 30 different solutions.
2 0 0 0
0 5 0 0
0 3 4 0
0 3 2 10
0 3 1 15
0 3 0 20
0 2 6 0
0 2 4 10
0 2 3 15
0 2 2 20
0 2 1 25
0 2 0 30
0 1 8 0
0 1 6 10
0 1 5 15
0 1 4 20
0 1 3 25
0 1 2 30
0 1 1 35
0 1 0 40
0 0 10 0
0 0 8 10
0 0 7 15
0 0 6 20
0 0 5 25
0 0 4 30
0 0 3 35
0 0 2 40
0 0 1 45
0 0 0 50
As you can see, it goes straight from 2 quarters to 0 - and I have no idea why. If you can point it out to me I'd appreciate it.

Do you have the full code, so we can just paste it into an editor and it it works, without having to piece things together? That makes it a lot easier to help. =]

Also, I asked this before (but not in a post that directly quoted you) and it's a very important difference: Is the question how many ways there are to make change, or which ways there are? This is important because if you take common coin denominations (1, 2, 5, 10, 25, 50, 100, 200), there are over 5 000 000 ways to change 500 cents and over 260 000 000 ways to change 1000 cents. While it's extremely easy to calculate how many ways there are, even for values much larger, it quickly become infeasible and slightly later impossible to determine which ways there are.

Sorry, there's a lot of posts in here so I must have missed yours. The full code is here. There are 2 classes - my main and the used class.

I want to show each way to make change one time - so a list of the coin combinations. Even for my relatively efficient current code, going to 1000 cents slows to a crawl. Is it that much faster if you're just counting number of ways to do it?

Not a problem. =] You can find Blisse and myself having a short discussion about this topic on page 691 of this thread.

The problem with having to show each possible combination is that you actually have to generate each possible combination. Even assuming you generate a perfect search tree where no incorrect combinations are ever tried (which is difficult enough, if not impossible, in itself), then you would still have to actually read and output each of those 260 000 000 combinations (in case of my earlier example, for 1000 cents). For time estimation it's usually fair to assume 100 000 000 operations per second, although (especially display) I/O is much slower.

In comparison, to determine how many combinations there are, all you need are D * V additions, where D is the amount of denominations and V is the value. For my example with 1000 cents, those would be 8 * 1000 additions. That is much, much cheaper than generating every possible (valid) combination.

Having said that, I'll be happy to help you look at your current code and help you find ways to improve it and find the bugs. I'll have a look after work. =]
People are not born stupid, they choose to be stupid. If you made that choice, please change your mind.
Cynry
Profile Blog Joined August 2010
810 Posts
Last Edited: 2015-12-16 10:58:44
December 16 2015 10:56 GMT
#13863
Hey guys, what are your thoughts on app directory structure for large apps ?
We're (same team as here http://www.teamliquid.net/forum/general/134491-the-big-programming-thread?page=665#13295) still having a hard time agreeing with each others, especially me apparently, so I'd like some outsider's opinion.

So far, we were working in a packages based architecture, where every feature of your app has its own dedicated packages where everything concerning said feature is put.
Some other dude showed us angular, so we tried switching to that, but now for some reason they want to stop working with the previous architecture and use a simple client/common/server folders instead. We are planning on building a large app and going open source so I can't see how it makes sense, but they find that easier to work with.

At that point I'm considering just moving on with them and working on my own, or at least in the way I think is best for the project, whether they follow or not. Seems extreme though, kind of a knee-jerk reaction, but I'm getting really tired of argumenting with them, them changing their minds, and the project not moving forward one bit for the past 2 months.

Thoughts on any of this ? Am I according too much importance to this "good practice" stuff again ? Am I simply wrong on what's best ? Since there was a debate about factoring code where they both thought it was pretty much useless, I'm not sure it's a good idea to still try to work with them anymore, seems to have caused mainly decisions that brought the quality of code down, while not providing any more productivity...

Edit : Might be useful to add that we're all 3 students, no one is particularly more experienced than the other, but I'm way more invested in the project we're working on, intend on working on it for a long time, and expanding it a lot. This doesn't hold true for them, they will probably be gone in less than a year. We're not employees, all 3 independants working together, so no one has any obligation to work for anybody here.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
December 16 2015 12:25 GMT
#13864
On December 16 2015 19:56 Cynry wrote:
*snip*

So far, we were working in a packages based architecture, where every feature of your app has its own dedicated packages where everything concerning said feature is put.
Some other dude showed us angular, so we tried switching to that, but now for some reason they want to stop working with the previous architecture and use a simple client/common/server folders instead. We are planning on building a large app and going open source so I can't see how it makes sense, but they find that easier to work with.

*snip*


It is always better to split stuff now and then combine it later if needed than to have stuff combined now and figure out how the heck to split it later if parts, but not all of it, are needed in a different part of the application or in a new application.

However, it all depends on the actual definition of feature and package in your project. If you split it up too much, you can easily end up doing more work than needed and you have a lot more dependencies between your modules, which can make it harder to work with the code later. It's a balancing act that requires experience.

In the end, speaking as more of a project manager than a programmer, you are now in a situation where you can either refactor or not and, since you are all inexperienced, the best way to go is to not refactor no matter how ugly all programmers think the code is and get the project out of the door. Once the project is finished and you have learned dozens of new lessons on the way, you can refactor the stuff and make it right, but if you don't even have a finished project, you won't ever know if the way you chose was the right way. Finish the project, learn what eventually turned out to be wrong and what turned out to not actually matter at all, only then can you do it better next time.

Refactoring is infinite, project schedules aren't.
Cynry
Profile Blog Joined August 2010
810 Posts
Last Edited: 2015-12-16 13:39:08
December 16 2015 13:28 GMT
#13865
Dunno man, what you're saying makes sense, I'm just tired of agreeing on coding dirty stuff (yeah sure, we can't know for sure what's good, but at the very least doing the way different people agree on being the best for bigger app is a good start I think) just for the sake of finishing the project, when the people I'm trying to keep working together barely work to begin with.
There's probably a lot more on this issue than just the architecture though.

I'm ok with just winging it and moving forward, but we're gonna have client looking into the code 2 weeks from now, we already have a long list of potential customers (and freaking big ones) so I don't see an easy time to refactor later. How would your project manager side would make all that work ? 'Cause for all my inexperience, I'm still the closest thing to a CTO we have, so I'm really interested in anything you could say to help managing projects and people...
Also told the board we agreed on something clean, because that was still the case monday. Doesn't help this mess either
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
December 16 2015 16:10 GMT
#13866
On December 16 2015 22:28 Cynry wrote:
Dunno man, what you're saying makes sense, I'm just tired of agreeing on coding dirty stuff (yeah sure, we can't know for sure what's good, but at the very least doing the way different people agree on being the best for bigger app is a good start I think) just for the sake of finishing the project, when the people I'm trying to keep working together barely work to begin with.
There's probably a lot more on this issue than just the architecture though.

I'm ok with just winging it and moving forward, but we're gonna have client looking into the code 2 weeks from now, we already have a long list of potential customers (and freaking big ones) so I don't see an easy time to refactor later. How would your project manager side would make all that work ? 'Cause for all my inexperience, I'm still the closest thing to a CTO we have, so I'm really interested in anything you could say to help managing projects and people...
Also told the board we agreed on something clean, because that was still the case monday. Doesn't help this mess either


First things first, there will never be clean code. There is messy code and there is messier code, but you will never achieve clean code in any project that is actually intended to be released at some point, and a big reason for that is because people can never agree on what clean code actually is. What you think is clean today will look like a horrible mess 6 month from now, especially code that you wrote yourself to the best of your ability.

You are working with people that have no obligation to work together with you or do what you ask them to, so your best bet is to let them write the code they think is best, which means that they are more motivated and will get stuff done, while you write the code the way you like it. Separate your code from their code and whenever you modify their code, refactor it to a very limited degree to how you like it, just don't start moving classes around without need. Eventually they will leave the project and you can replace the code they wrote with better code, as long as their code is mostly separated from yours.

Your first priority is keeping them motivated to get stuff done and that doesn't work by telling them "You're doing it wrong". You have to make a compromise between giving them the freedom to implement their ideas, giving them the chance to learn from their mistakes, and making sure their bad ideas don't interfere with the better parts of the program. It's difficult to do that, but it's the only way you can keep them working on the project. If you try to force issues, they'll just stop caring and then you're either two programmers down or have two programmers that are so unproductive that they might as well not work at all. The first idea for code separation which you will most likely have is division of responsibility. Don't do that, it hurts motivation and productivity if someone only does X and isn't allowed to do Y. Ask them to make the feature code self-contained where possible, and you'll later be able to scrap the code of a feature and replace it with a better implementation while they still have the ability to implement features the way they want them - just don't tell them that that's your plan.

A client looking into your code is not a big deal. What clients look for are security concerns, not code quality stuff. 99% of all projects would never get completed if good code was a condition for it. As long as you don't have SQL injection, XSS or plain-text passwords, you should be fine for any review. I have seen the worst kinds of spaghetti code pass code reviews for payment partners that were far, far more serious than PCI. As long as your code is stable and secure, it doesn't matter if all your classes are called Alice and Bob. If you have other clients lined up, it's even more important to make sure your project reaches a finished state soon. If you are 80% finished, remember that that means you've only done 20% of the work and you still have 80% of the work ahead of you - and no, I'm not kidding with that one.

In the end, you will not be able to make them write code your way unless you pay them for it, so just make them keep writing code and try to contain the damage or you'll be on the project on your own - and then you'll probably never finish it.
Manit0u
Profile Blog Joined August 2004
Poland17754 Posts
Last Edited: 2015-12-16 22:05:48
December 16 2015 22:04 GMT
#13867
I have to agree with Morfildur here. Up until very recently I was all boy scout, refactoring bad code whenever I had some spare time and I've noticed it while working on something else. All that changed when people started bitching about me touching their code that worked. No amount of "it's still working just as before except now we're not constructing XML by concatenating strings any more, which makes it more reusable and easier to work with (and doesn't look like total shit within the code)" was going to convince them.

Still, every time I come across recent code that's been written by an experienced developer but looks like some total newbie wrote it 15-20 years ago I die a little inside

I guess that people learn a certain way of doing something and they'll keep doing it this way forever, even if it's not a good way.
Time is precious. Waste it wisely.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
December 16 2015 22:47 GMT
#13868
On December 17 2015 07:04 Manit0u wrote:
I have to agree with Morfildur here. Up until very recently I was all boy scout, refactoring bad code whenever I had some spare time and I've noticed it while working on something else. All that changed when people started bitching about me touching their code that worked. No amount of "it's still working just as before except now we're not constructing XML by concatenating strings any more, which makes it more reusable and easier to work with (and doesn't look like total shit within the code)" was going to convince them.

Still, every time I come across recent code that's been written by an experienced developer but looks like some total newbie wrote it 15-20 years ago I die a little inside

I guess that people learn a certain way of doing something and they'll keep doing it this way forever, even if it's not a good way.

I don't think it's a good idea to refactor code that you weren't going to touch anyways - unless you do it in a planned and communicated way. Fix bad code a little (don't go crazy, take tiny steps, and try to use safe, tool-assisted refactorings for the most part) before you modify/expand it. Also communicate this concept with the team. You won't get anywhere if you're the only one cleaning up. Just be careful how you talk your team into it. Use tiny steps here as well. If you try to change their mindset in one big swoop you're just going to face even more opposition.
If you have a good reason to disagree with the above, please tell me. Thank you.
Cyx.
Profile Joined November 2010
Canada806 Posts
Last Edited: 2015-12-17 00:01:56
December 17 2015 00:01 GMT
#13869
On December 17 2015 07:47 spinesheath wrote:
I don't think it's a good idea to refactor code that you weren't going to touch anyways - unless you do it in a planned and communicated way.

This, this, so much this. I used to be the same way, and then eventually, I realized 'it's still working just as it was before' is literally never true. If you don't have a damn good reason to change something that isn't causing visible breakage, you're taking on non-trivial amounts of risk just to make yourself feel better about your pretty code.

That being said, sometimes you definitely do need to refactor - but I've moved far, far, far away from doing it 'just to tidy up'.
Manit0u
Profile Blog Joined August 2004
Poland17754 Posts
December 17 2015 00:32 GMT
#13870
Yeah, well. It was agreed upon with the team beforehand that if we see crappy code (mostly stuff from old systems integrated into newer ones) we should fix it. When I stopped refactoring such stuff I kept getting comments in my commits like "What the hell man? You leave such crap in there? Not that long ago you'd totally rework it ". Got mixed and confusing communiques so I just stopped caring some time ago. I do my thing and leave the rest as is, even if it hurts me to do so.
Time is precious. Waste it wisely.
Lazorstorm
Profile Blog Joined May 2014
34 Posts
December 17 2015 01:06 GMT
#13871
On December 16 2015 09:40 tofucake wrote:
If it's on the PC you can do what you want in Batch


Thanks again to everyone who replied on my question.
In the end i managed to copy everything with a batch file.

move /-y "D:\Roms\*[i]*.smc" "G:\"
pause

*in explanation, this moved all the files in D:\Roms containing [i] in the filename to G:\, which is a usb drive.

Worked like a charm. ^^


Long time lurker
Acrofales
Profile Joined August 2010
Spain18299 Posts
December 17 2015 01:57 GMT
#13872
On December 17 2015 09:01 Cyx. wrote:
Show nested quote +
On December 17 2015 07:47 spinesheath wrote:
I don't think it's a good idea to refactor code that you weren't going to touch anyways - unless you do it in a planned and communicated way.

This, this, so much this. I used to be the same way, and then eventually, I realized 'it's still working just as it was before' is literally never true. If you don't have a damn good reason to change something that isn't causing visible breakage, you're taking on non-trivial amounts of risk just to make yourself feel better about your pretty code.

That being said, sometimes you definitely do need to refactor - but I've moved far, far, far away from doing it 'just to tidy up'.

Here's the guys who know their shit :D While your fingers may be itching to tidy up someone else's code, just don't. It can break things that weren't broken, piss people off, and all you get out of it is neater code (in your opinion).

Blisse
Profile Blog Joined July 2010
Canada3710 Posts
December 17 2015 06:25 GMT
#13873
Did well with Google interview, bombed the first, did good on the rest. And then I missed my flight back home. Hate. Life.
There is no one like you in the universe.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
December 17 2015 06:54 GMT
#13874
--- Nuked ---
Cynry
Profile Blog Joined August 2010
810 Posts
Last Edited: 2015-12-17 10:09:29
December 17 2015 09:26 GMT
#13875
On December 17 2015 09:01 Cyx. wrote:
Show nested quote +
On December 17 2015 07:47 spinesheath wrote:
I don't think it's a good idea to refactor code that you weren't going to touch anyways - unless you do it in a planned and communicated way.

This, this, so much this. I used to be the same way, and then eventually, I realized 'it's still working just as it was before' is literally never true. If you don't have a damn good reason to change something that isn't causing visible breakage, you're taking on non-trivial amounts of risk just to make yourself feel better about your pretty code.

That being said, sometimes you definitely do need to refactor - but I've moved far, far, far away from doing it 'just to tidy up'.


Yeah well we're far from 'just tidying up' anything here. From the respone I got here, it seems that everyone thinks I'm some kind of psycho-rigid refactoring maniac. And it might very well be true, but that's not what's happening now.
We were working on some file architecture that is said to work well for what we want to do for months, and now it's been 3 days since they said "well, why not rather go with this splendid file organisation that I found on a beginner tutorial". Deadline is in 2 weeks. Yeah this is what's happening. I'd be happy if I even had code to consider refactoring, but right now we have nothing to show at all, that isn't 2 months old.

Touching and breaking other's code without asking them ? Yeah there was some of that, but not from me. And I couldn't for the life of me even make him tell why he changed anything. He was even convinced that it worked better after he changed it. It didn't. That's the kind of bullshit I have to make do with, so yeah I'm lacking patience, and the urge to "keep the team together at all cost" is fading. They are paid, that are not delivering, arguing with them is tiresome and amnesia will make it worthless after some time anyway.
Manit0u
Profile Blog Joined August 2004
Poland17754 Posts
Last Edited: 2015-12-17 14:53:43
December 17 2015 14:53 GMT
#13876
On December 17 2015 10:57 Acrofales wrote:
Show nested quote +
On December 17 2015 09:01 Cyx. wrote:
On December 17 2015 07:47 spinesheath wrote:
I don't think it's a good idea to refactor code that you weren't going to touch anyways - unless you do it in a planned and communicated way.

This, this, so much this. I used to be the same way, and then eventually, I realized 'it's still working just as it was before' is literally never true. If you don't have a damn good reason to change something that isn't causing visible breakage, you're taking on non-trivial amounts of risk just to make yourself feel better about your pretty code.

That being said, sometimes you definitely do need to refactor - but I've moved far, far, far away from doing it 'just to tidy up'.

Here's the guys who know their shit :D While your fingers may be itching to tidy up someone else's code, just don't. It can break things that weren't broken, piss people off, and all you get out of it is neater code (in your opinion).



I agree. The problem I'm facing however is that most people write the code with the thought that they won't have to look at it ever again. The thing is, they won't have to look at it but I will since most of the devs in my company are concerned only with the ongoing project and after it's released they move on to the next while me and one other guy have to not only work on ongoing stuff but also fix those previously released. This means that when most of our devs only work on one project at a time I have to work on 4-5 simultaneously (and I'll have to do this refactoring sooner or later so I'd rather do it sooner)... Sometimes life just isn't fair
Time is precious. Waste it wisely.
Cynry
Profile Blog Joined August 2010
810 Posts
December 17 2015 16:52 GMT
#13877
Want a job Manitou ? :D
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
December 17 2015 18:51 GMT
#13878
On December 17 2015 15:54 Nesserev wrote:
Show nested quote +
On December 17 2015 15:25 Blisse wrote:
Did well with Google interview, bombed the first, did good on the rest. And then I missed my flight back home. Hate. Life.

What was the whole process? Got any fun or memorable interview questions?


2 interviews in morning, 1 hr casual lunch with someone, 2 interviews after lunch.

really nervous with first interview, and the guy expected me to debug a stack frame. I learned all the parts before in my security class but totally blanked because of rust. He expected really good C++ skills and I was totally not thinking... also a coding question that i messed up the end condition on but sssh

next two interviews were straightforward, count the number of components in a linked list given a stream of nodes in the list that signify they are components, and then an open design and implementation question about determining if two people are blood related in a family tree.

the last one was a super open question about upgrading software on a bunch of servers on the moon.
There is no one like you in the universe.
netherh
Profile Blog Joined November 2011
United Kingdom333 Posts
December 17 2015 20:54 GMT
#13879
I finally got a proper job as a C++ programmer a few weeks ago. Does anyone have any tips for learning and understanding large code-bases? I don't really want to keep having to ask other people how things work in the code base, but that often seems to be the quickest way.

I've also been experiencing the frustration of other people's bad code. I'd want to re-write certain things (and I have to change bits of it anyway), but it's just so hard to change anything without breaking other stuff that shouldn't even be relevant. It seems like the best (least painful and least time-consuming) choices I can make just isolate and remove my own code as much as possible from what's already there. Which doesn't really seem right. Maybe I'm just being too anal about things.

I suspect the only solution is to make damn sure that people only commit clean code to start with. Which I guess means having strict standards and conventions, and code reviews.
dae
Profile Joined June 2010
Canada1600 Posts
Last Edited: 2015-12-17 23:24:25
December 17 2015 23:22 GMT
#13880
On December 18 2015 05:54 netherh wrote:
I finally got a proper job as a C++ programmer a few weeks ago. Does anyone have any tips for learning and understanding large code-bases? I don't really want to keep having to ask other people how things work in the code base, but that often seems to be the quickest way.

I've also been experiencing the frustration of other people's bad code. I'd want to re-write certain things (and I have to change bits of it anyway), but it's just so hard to change anything without breaking other stuff that shouldn't even be relevant. It seems like the best (least painful and least time-consuming) choices I can make just isolate and remove my own code as much as possible from what's already there. Which doesn't really seem right. Maybe I'm just being too anal about things.

I suspect the only solution is to make damn sure that people only commit clean code to start with. Which I guess means having strict standards and conventions, and code reviews.


If your not sure what something is/does, and you can't figure it out in 15 minutes, ask. The alternative is that you code missing knowledge of what something does, which will cause errors, or spend an excessive amount of time trying to figure it out yourself. A lot of the time it is something that can be explained in a short amount of time.

About bad coding styles, I've found that it is best to just follow the style of the code that you are changing, even if it is bad. It is better to have a consistent, but bad style/code then to have a patchwork of many different styles/coding habits. If your going to be changing it, you really need to change ALL of it at once, which is usually a massive task that won't ever get completed.
Prev 1 692 693 694 695 696 1032 Next
Please log in or register to reply.
Live Events Refresh
Big Brain Bouts
16:00
#118
Shino vs ScarlettLIVE!
Bly vs DnS
Serral vs ByuN
RotterdaM938
IndyStarCraft 113
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 938
IndyStarCraft 113
UpATreeSC 95
ProTech89
BRAT_OK 73
MindelVK 1
StarCraft: Brood War
Sea 1820
Jaedong 1198
EffOrt 1158
Mini 430
Light 346
BeSt 342
ggaemo 270
Rush 244
actioN 177
Zeus 125
[ Show more ]
Sexy 62
Sacsri 20
Rock 20
GoRush 18
soO 17
ajuk12(nOOB) 13
Terrorterran 9
Dota 2
Gorgc3078
qojqva1527
Counter-Strike
fl0m1886
byalli300
Other Games
Grubby2751
singsing2612
hiko819
Beastyqt582
DeMusliM182
QueenE175
Liquid`VortiX122
XaKoH 102
KnowMe65
Trikslyr55
Mew2King45
fpsfer 1
Organizations
StarCraft 2
WardiTV762
Counter-Strike
PGL264
Other Games
BasetradeTV184
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 16 non-featured ]
StarCraft 2
• StrangeGG 120
• Gemini_19 32
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Nemesis3828
• Jankos2168
• TFBlade1062
Other Games
• WagamamaTV266
Upcoming Events
Replay Cast
7h 22m
RSL Revival
14h 22m
Lambo vs SHIN
Solar vs Rogue
herO vs Clem
Maestros of the Game
18h 22m
IPSL
23h 22m
ZZZero vs WorsT
Julia vs eOnzErG
BSL
1d 2h
TerrOr vs Dewalt
Bonyth vs eOnzErG
Replay Cast
1d 7h
RSL Revival
1d 14h
Maestros of the Game
1d 20h
OSC
1d 20h
IPSL
1d 23h
Dragon vs Artosis
dxtr13 vs Hawk
[ Show More ]
BSL
2 days
Wardi Open
2 days
Monday Night Weeklies
2 days
Replay Cast
3 days
Sparkling Tuna Cup
3 days
WardiTV Spring Champion…
3 days
Maestros of the Game
3 days
The PondCast
4 days
Maestros of the Game
4 days
Replay Cast
5 days
Replay Cast
5 days
WardiTV Spring Champion…
5 days
Maestros of the Game
5 days
Replay Cast
6 days
uThermal 2v2 Circuit
6 days
Maestros of the Game
6 days
Liquipedia Results

Completed

ASL Season 21
2026 GSL S1
Heroes Pulsing #1

Ongoing

2026 KK StarCraft Pro League
BSL Season 22
IPSL Spring 2026
KCM Race Survival 2026 Season 2
KK 2v2 League Season 1
Acropolis #4
CSCL: Masked Kings S4
Escore Tournament S2: King of Kings
SCTL 2026 Spring
WardiTV Spring 2026
2026 GSL S2
RSL Revival: Season 5
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026

Upcoming

YSL S3
BSL 22 Non-Korean Championship
CSLAN 4
Blizzard Classic Cup 2026
Kung Fu Cup 2026 Grand Finals
CranK Gathers Season 4: BW vs SC2 Team League
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
Heroes Pulsing #2
Bounty Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 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.