• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 19:10
CEST 01:10
KST 08:10
  • 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
[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy9uThermal's 2v2 Tour: $15,000 Main Event18
Community News
Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris34Weekly Cups (Aug 11-17): MaxPax triples again!13Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195
StarCraft 2
General
BoxeR's Wings Episode 2 - Fan Translation Greatest Players of All Time: 2025 Update #1: Maru - Greatest Players of All Time A Eulogy for the Six Pool Geoff 'iNcontroL' Robinson has passed away
Tourneys
$5,000 WardiTV Summer Championship 2025 Maestros of The Game—$20k event w/ live finals in Paris $5,100+ SEL Season 2 Championship (SC: Evo) Esports World Cup 2025 Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Custom Maps
External Content
Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ Post ASL20 Ro24 discussion. No Rain in ASL20? How do I speak directly to Coinbase?1-(888)-419-97 Recent recommended BW games
Tourneys
[ASL20] Ro24 Group D [ASL20] Ro24 Group E Small VOD Thread 2.0 [Megathread] Daily Proleagues
Strategy
Muta micro map competition Simple Questions, Simple Answers Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Nintendo Switch Thread Dawn of War IV 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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread The year 2050 European Politico-economics QA Mega-thread
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s) Gtx660 graphics card replacement
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
How Culture and Conflict Imp…
TrAiDoS
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
[Girl blog} My fema…
artosisisthebest
Customize Sidebar...

Website Feedback

Closed Threads



Active: 967 users

The Big Programming Thread - Page 185

Forum Index > General Forum
Post a Reply
Prev 1 183 184 185 186 187 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.
chaokel
Profile Blog Joined October 2010
Australia535 Posts
October 31 2012 20:24 GMT
#3681
On November 01 2012 04:34 Ilikestarcraft wrote:
Show nested quote +
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?

I think you're getting a little too far ahead of yourself. From the way you worded it, it seems that you haven't even learned or tried out programming yet and you want to decide to make it your job? Overall I think its a bad way to approach it. Try it out first and if you enjoy it then you can start to take it more seriously and make a career out of it.


I have to emphasis this, programming isn't for everyone. If you truly are interested in learning programming to make a living i would suggest trying it out for a few weeks first. Pick up some beginner C / Java books. Attempt to learn as much as you can in that time, put yourself into the mindset that this is what the majority of your working life will be like. If you enjoy it, go ahead and continue learning.

My personal recommendation is to start off learning C. It covers so many (what i consider)essential programming concepts, in a relatively small and simple language. It is however much less forgiving than a language like java, it will force you learn how things actually work behind the scenes if you want to get something done.
Fyodor
Profile Blog Joined September 2010
Canada971 Posts
October 31 2012 20:32 GMT
#3682
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?

If you start learning now, you're at least 4 years away from earning any money.

What will be in demand in 4 years? C/C++ is a strong bet IMO. Java should still be around but I feel the managed language bubble is starting to deflate a little bit. Web technologies will probably still be in demand too so Javascript-like languages, HTML, CSS, PHP, Databases.

If you're serious about investing the time and effort then I suggest you don't follow web tutorials but rather focus on scrounging up some classes that the big universities are offering for free on sites like coursera. They are carbon copies of the elite computer science programs except that you don't earn credit but some do offer certificates of completion. Proper textbooks are also a must so amazon is your friend. Look up university programs and start hacking away at the required topics and skills.

If you think you can follow a bunch of web tutorials for 20 hours and make money with android apps then you are being a fool, let's make that clear. With that said, the desire to make apps is not a bad motivation. Just understand that becoming a good self-taught programmer is tough.
llllllllllllllllllllllllllllllllllllllllllll
chaokel
Profile Blog Joined October 2010
Australia535 Posts
October 31 2012 22:38 GMT
#3683
On November 01 2012 05:32 Fyodor wrote:
Show nested quote +
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?

If you start learning now, you're at least 4 years away from earning any money.

What will be in demand in 4 years? C/C++ is a strong bet IMO. Java should still be around but I feel the managed language bubble is starting to deflate a little bit. Web technologies will probably still be in demand too so Javascript-like languages, HTML, CSS, PHP, Databases.

If you're serious about investing the time and effort then I suggest you don't follow web tutorials but rather focus on scrounging up some classes that the big universities are offering for free on sites like coursera. They are carbon copies of the elite computer science programs except that you don't earn credit but some do offer certificates of completion. Proper textbooks are also a must so amazon is your friend. Look up university programs and start hacking away at the required topics and skills.

If you think you can follow a bunch of web tutorials for 20 hours and make money with android apps then you are being a fool, let's make that clear. With that said, the desire to make apps is not a bad motivation. Just understand that becoming a good self-taught programmer is tough.


4 years maybe for a professional job, even then i think thats pushing it. A 3 year university degree can be condensed down to less than a years worth of work if you are dedicated.

You can probably jump into making your own self-funded android apps after several months if that was all you focused on and you worked hard at it every day.
Sub40APM
Profile Joined August 2010
6336 Posts
October 31 2012 22:46 GMT
#3684
On November 01 2012 05:32 Fyodor wrote:
Show nested quote +
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?

If you start learning now, you're at least 4 years away from earning any money.

What will be in demand in 4 years? C/C++ is a strong bet IMO. Java should still be around but I feel the managed language bubble is starting to deflate a little bit. Web technologies will probably still be in demand too so Javascript-like languages, HTML, CSS, PHP, Databases.

If you're serious about investing the time and effort then I suggest you don't follow web tutorials but rather focus on scrounging up some classes that the big universities are offering for free on sites like coursera. They are carbon copies of the elite computer science programs except that you don't earn credit but some do offer certificates of completion. Proper textbooks are also a must so amazon is your friend. Look up university programs and start hacking away at the required topics and skills.

If you think you can follow a bunch of web tutorials for 20 hours and make money with android apps then you are being a fool, let's make that clear. With that said, the desire to make apps is not a bad motivation. Just understand that becoming a good self-taught programmer is tough.

4 years?
Even if you are doing a comp sci major, you are spending only 13-14 weeks, twice a year, in 4 courses.
So thats 28 x 4 x 4 hours per year of course studying. So thats 1792 hours of courses + for every class hour lets assume 2 hours of studying so 5376 hours total. There are 8765.81 hours in a year. If he devotes 1/3d of all his annual years, he can do it in 22 months?
Ruscour
Profile Blog Joined April 2011
5233 Posts
October 31 2012 22:54 GMT
#3685
Is there a way to quickly compile C in Visual Studio? I've always been a Linux guy and I've never used an IDE before and I don't really know what I'm doing (and pretty much just using it as a text editor with syntax highlighting). The documentation says just do it through the command line. Am I missing something like what Sublime Text has to compile and run from within the editor?
RoyGBiv_13
Profile Blog Joined August 2010
United States1275 Posts
October 31 2012 23:15 GMT
#3686
Which Visual Studio? And yes, there is a button to compile and run within the IDE. Check for a Debug button somewhere, and make sure you're compiling for development, not production.
DISCLAIMER: I almost never, ever use VS as I have my own proprietary IDE for C, so this is from memory.
Any sufficiently advanced technology is indistinguishable from magic
tofucake
Profile Blog Joined October 2009
Hyrule19082 Posts
October 31 2012 23:16 GMT
#3687
F5 has been "build and run" in VS for as long as I can remember.
Liquipediaasante sana squash banana
chaokel
Profile Blog Joined October 2010
Australia535 Posts
October 31 2012 23:21 GMT
#3688
On November 01 2012 07:54 Ruscour wrote:
Is there a way to quickly compile C in Visual Studio? I've always been a Linux guy and I've never used an IDE before and I don't really know what I'm doing (and pretty much just using it as a text editor with syntax highlighting). The documentation says just do it through the command line. Am I missing something like what Sublime Text has to compile and run from within the editor?


Sure, you can either run the program in debug mode (F5) which will launch it from within VS, quick and easy for testing / making rapid changes. Or you can build the project, which can be done by switching to release and building (F7). This will give you a working exe, which will be located in your program directory.
lolmlg
Profile Joined November 2011
619 Posts
October 31 2012 23:24 GMT
#3689
On November 01 2012 07:46 Sub40APM wrote:
Show nested quote +
On November 01 2012 05:32 Fyodor wrote:
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?

If you start learning now, you're at least 4 years away from earning any money.

What will be in demand in 4 years? C/C++ is a strong bet IMO. Java should still be around but I feel the managed language bubble is starting to deflate a little bit. Web technologies will probably still be in demand too so Javascript-like languages, HTML, CSS, PHP, Databases.

If you're serious about investing the time and effort then I suggest you don't follow web tutorials but rather focus on scrounging up some classes that the big universities are offering for free on sites like coursera. They are carbon copies of the elite computer science programs except that you don't earn credit but some do offer certificates of completion. Proper textbooks are also a must so amazon is your friend. Look up university programs and start hacking away at the required topics and skills.

If you think you can follow a bunch of web tutorials for 20 hours and make money with android apps then you are being a fool, let's make that clear. With that said, the desire to make apps is not a bad motivation. Just understand that becoming a good self-taught programmer is tough.

4 years?
Even if you are doing a comp sci major, you are spending only 13-14 weeks, twice a year, in 4 courses.
So thats 28 x 4 x 4 hours per year of course studying. So thats 1792 hours of courses + for every class hour lets assume 2 hours of studying so 5376 hours total. There are 8765.81 hours in a year. If he devotes 1/3d of all his annual years, he can do it in 22 months?

Sure. And nobody will hire him, because he doesn't have a degree or any professional programming experience. If he wants to start his own company, more power to him. But he didn't say that, so we shouldn't assume it, right?

I should also mention that the demand for C++ is relatively low, even in areas with large high tech industries. But there will be C++ jobs for a long time regardless. However, the idea that there is some kind of "managed language bubble" that could deflate is silly. Web applications run on managed languages pretty much exclusively.
chaokel
Profile Blog Joined October 2010
Australia535 Posts
October 31 2012 23:43 GMT
#3690
On November 01 2012 08:24 lolmlg wrote:
Show nested quote +
On November 01 2012 07:46 Sub40APM wrote:
On November 01 2012 05:32 Fyodor wrote:
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?

If you start learning now, you're at least 4 years away from earning any money.

What will be in demand in 4 years? C/C++ is a strong bet IMO. Java should still be around but I feel the managed language bubble is starting to deflate a little bit. Web technologies will probably still be in demand too so Javascript-like languages, HTML, CSS, PHP, Databases.

If you're serious about investing the time and effort then I suggest you don't follow web tutorials but rather focus on scrounging up some classes that the big universities are offering for free on sites like coursera. They are carbon copies of the elite computer science programs except that you don't earn credit but some do offer certificates of completion. Proper textbooks are also a must so amazon is your friend. Look up university programs and start hacking away at the required topics and skills.

If you think you can follow a bunch of web tutorials for 20 hours and make money with android apps then you are being a fool, let's make that clear. With that said, the desire to make apps is not a bad motivation. Just understand that becoming a good self-taught programmer is tough.

4 years?
Even if you are doing a comp sci major, you are spending only 13-14 weeks, twice a year, in 4 courses.
So thats 28 x 4 x 4 hours per year of course studying. So thats 1792 hours of courses + for every class hour lets assume 2 hours of studying so 5376 hours total. There are 8765.81 hours in a year. If he devotes 1/3d of all his annual years, he can do it in 22 months?

Sure. And nobody will hire him, because he doesn't have a degree or any professional programming experience. If he wants to start his own company, more power to him. But he didn't say that, so we shouldn't assume it, right?

I should also mention that the demand for C++ is relatively low, even in areas with large high tech industries. But there will be C++ jobs for a long time regardless. However, the idea that there is some kind of "managed language bubble" that could deflate is silly. Web applications run on managed languages pretty much exclusively.


Yes but if he takes two of those extra years and builds up a portfolio working for himself or at smaller companies, he will be infinitely more hireable than someone fresh out of uni/college with only a degree to their name. More companies will hire off of demonstration that a person has the ability to apply learnt knowledge and finish projects than someone who has a degree.

Apart from the material learnt a degree is only there to give you that edge to sneak ahead of the pack. Simply doing 4 years and having nothing practical to show for it isn't going to get you that job over the one guy who has a large portfolio and no degree.
Cheerio
Profile Blog Joined August 2007
Ukraine3178 Posts
Last Edited: 2012-11-01 00:14:17
November 01 2012 00:13 GMT
#3691
On November 01 2012 08:24 lolmlg wrote:
Show nested quote +
On November 01 2012 07:46 Sub40APM wrote:
On November 01 2012 05:32 Fyodor wrote:
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?

If you start learning now, you're at least 4 years away from earning any money.

What will be in demand in 4 years? C/C++ is a strong bet IMO. Java should still be around but I feel the managed language bubble is starting to deflate a little bit. Web technologies will probably still be in demand too so Javascript-like languages, HTML, CSS, PHP, Databases.

If you're serious about investing the time and effort then I suggest you don't follow web tutorials but rather focus on scrounging up some classes that the big universities are offering for free on sites like coursera. They are carbon copies of the elite computer science programs except that you don't earn credit but some do offer certificates of completion. Proper textbooks are also a must so amazon is your friend. Look up university programs and start hacking away at the required topics and skills.

If you think you can follow a bunch of web tutorials for 20 hours and make money with android apps then you are being a fool, let's make that clear. With that said, the desire to make apps is not a bad motivation. Just understand that becoming a good self-taught programmer is tough.

4 years?
Even if you are doing a comp sci major, you are spending only 13-14 weeks, twice a year, in 4 courses.
So thats 28 x 4 x 4 hours per year of course studying. So thats 1792 hours of courses + for every class hour lets assume 2 hours of studying so 5376 hours total. There are 8765.81 hours in a year. If he devotes 1/3d of all his annual years, he can do it in 22 months?

Sure. And nobody will hire him, because he doesn't have a degree or any professional programming experience. If he wants to start his own company, more power to him. But he didn't say that, so we shouldn't assume it, right?

I should also mention that the demand for C++ is relatively low, even in areas with large high tech industries. But there will be C++ jobs for a long time regardless. However, the idea that there is some kind of "managed language bubble" that could deflate is silly. Web applications run on managed languages pretty much exclusively.

Well if your point is that programming online courses (or some other form of self-education) are a complete waste of time you can just say so.
Craton
Profile Blog Joined December 2009
United States17250 Posts
Last Edited: 2012-11-01 00:35:11
November 01 2012 00:31 GMT
#3692
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?

Don't try to over-specialize. Android development is just one part of mobile development which is just one part of programming.

It's fine to do mobile development, but you want to focus on having a broader understanding. A lot of programming knowledge translates from one type of coding to the next, but there are also some specific considerations for more specific things (e.g. with mobile dev you deal with a lack of a mouse and smaller screens).

The typical approach is just to take a CS or CIS program at some college. Even if you try to self-teach, it's very important to focus on best practices and WHY they're the best practice. It's very easy to write a program with shitty code that's hard to read, maintain, or build upon. Early decisions often have huge impacts down the road.

That's not to say you can't self-teach, but you need to be acutely aware of its limitations and make a point of addressing them.

One of the best ways to learn (and improve at) programming is to figure out something you want to do and then do it. Once you've got it done, do it again from scratch, except this time focus on doing everything better (i.e. follow best practices, design around enterprise standards, etc.) You can write the same program many times and come out with a better product each time. You learn a lot trying things out and then asking for advice on how to improve what you've done.

My current personal project is a relatively simple CRUD application used to track my stats from League of Legends. Despite how comparatively small it is, there's a ton of little nuggets to be gleaned.

There is no substitute for actual coding experience.
twitch.tv/cratonz
netherh
Profile Blog Joined November 2011
United Kingdom333 Posts
November 01 2012 00:37 GMT
#3693
On November 01 2012 08:21 chaokel wrote:
Show nested quote +
On November 01 2012 07:54 Ruscour wrote:
Is there a way to quickly compile C in Visual Studio? I've always been a Linux guy and I've never used an IDE before and I don't really know what I'm doing (and pretty much just using it as a text editor with syntax highlighting). The documentation says just do it through the command line. Am I missing something like what Sublime Text has to compile and run from within the editor?


Sure, you can either run the program in debug mode (F5) which will launch it from within VS, quick and easy for testing / making rapid changes. Or you can build the project, which can be done by switching to release and building (F7). This will give you a working exe, which will be located in your program directory.


Or Ctrl + F5, which launches outside debug mode.
chaokel
Profile Blog Joined October 2010
Australia535 Posts
November 01 2012 00:52 GMT
#3694
On November 01 2012 09:31 Craton wrote:
Show nested quote +
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?


There is no substitute for actual coding experience.


This is pretty much what it all boils down to.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2012-11-01 01:32:26
November 01 2012 01:25 GMT
#3695
On November 01 2012 09:52 chaokel wrote:
Show nested quote +
On November 01 2012 09:31 Craton wrote:
On November 01 2012 04:26 Cheerio wrote:
Hi guys. I am interested in learning programming from scratch with an intention of making it my main job. I was advised that Android Developer is good destination point by a friend. So my questions:
1) How does one get started to become an Android Developer? Any guide for a step-by-step plan of studying or online courses you can advise?
2) Would you advise becoming an Android Developer yourself?


There is no substitute for actual coding experience.


This is pretty much what it all boils down to.


I kind of prefer

On November 01 2012 09:31 Craton wrote:
Early decisions often have huge impacts down the road.


even though it follows from actual coding experience.
There is no one like you in the universe.
Craton
Profile Blog Joined December 2009
United States17250 Posts
November 01 2012 01:32 GMT
#3696
Spend a month on any large project and you'll learn that in excruciating detail
twitch.tv/cratonz
ddrddrddrddr
Profile Joined August 2010
1344 Posts
November 01 2012 19:30 GMT
#3697
Hi,

I'm currently trying to find a way to distribute a project written in python. It is unix-based, has multiple scripts, an immutable file structure, and has multiple (pain in the ass) external module dependencies. I would like to be able to create a stand alone distribution which requires no environment set up. This package meant for testing so it has to be usable with no chance of introducing changes to the environment, even when used by a casual user. If anyone have a fair amount of experience freezing distributions using stuff like pyinstaller, cx_freeze, and especially bbfreeze, could you please speak with me? I need to get this working and the amount of documentation I'm finding is simply not sufficient.

Thanks!
EscPlan9
Profile Blog Joined December 2006
United States2777 Posts
Last Edited: 2012-11-02 04:08:15
November 02 2012 01:58 GMT
#3698
I feel like there must be a simple recursive solution for this that I'm just not wrapping my head around at the moment.

There is a count-to-N number passed in, and a maximum-sum number passed in. What I want to do is find all possible 1 or 2 number combinations as long as their sum is less than the maximum-sum. For illustrative purposes, let's say the arguments are 4 and 6.

So I start with 1 2 3 4 as the initial condition. Then I also want to find all summation combinations of those numbers that still are not greater than 6.

So valid numbers out of these are {1} {2} {3} {4} {1,2} {1,3} {1,4} {2,3} and {2,4}. Invalid would be {3,4} since the sum is 7 (greater than 6). I also do not want to count duplicates, such as {1,2} and {2,1}.

I'm a little scatter brained at the moment... but my idea so far for figuring out only the unique numbers where the sum is less than the max_sum...


// legalMoves is a vector<vector<int>>
// board is a vector<int> representing all the numbers on the "board"

void generateLegalMoves(int startIndex)
{
// stop the recursion when you reach the last element of the vector
while ( startIndex < board.size() )
{
// add the individual number if its less than the max_sum
if ( board[startIndex] <= maxSum )
{
vector<int> temp;
temp.push_back(1); // indicating only 1 number is used - for later evaluations
temp.push_back(startIndex); // and its index which will make sense later
temp.push_back(startIndex);
legalMoves.push_back(temp); // add it to the vector<vector<int>> for later use
}

// find valid sums less than max_sum
int sum = 0; // reset sum at the start of each call to the function.
for (int i = startIndex; i + 1 < board.size(); i++)
{
sum = board[startIndex] + board[i];
if (sum <= maxSum)
{
vector<int> temp;
temp.push_back(2); // representing 2 numbers are here for later evaluation
temp.push_back(startIndex); // grabs index of starting number for later evaluation
temp.push_back(i); // grabs current index for later evaluation
legalMoves.push_back(temp);
}
}

startIndex++;
generateLegalMoves(startIndex); // recursive call to start at the next element
}
}


Is there a better way to get at accomplishing this? I'm getting some duplicates doing it this way. Any suggestions to clean this up would be greatly appreciated
Undefeated TL Tecmo Super Bowl League Champion
CarelessPride
Profile Joined March 2011
United States146 Posts
November 02 2012 02:13 GMT
#3699
Hey I just started taking classes in programming and I have a few questions:
1. When video games are being developed do they create their own engine or do they buy the licenses off others already made engines? Also what are the common or efficient languages used to design video games?
2. How long would it take to recreate a similar game to lets say starcraft 2 or Diablo 3. like no create design wise just recreate everything from scratch
simcaster
Profile Joined November 2012
United States1 Post
November 02 2012 02:28 GMT
#3700
On November 02 2012 11:13 CarelessPride wrote:
Hey I just started taking classes in programming and I have a few questions:
1. When video games are being developed do they create their own engine or do they buy the licenses off others already made engines? Also what are the common or efficient languages used to design video games?

The vast majority of games license an engine. C++ is commonly used to design engines and lighter scripting languages like lua and python are used for everything else.
On November 02 2012 11:13 CarelessPride wrote:
2. How long would it take to recreate a similar game to lets say starcraft 2 or Diablo 3. like no create design wise just recreate everything from scratch

It would take years and a large team to recreate a game of the quality of SC2 or D3.
Prev 1 183 184 185 186 187 1031 Next
Please log in or register to reply.
Live Events Refresh
Next event in 50m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ProTech122
CosmosSc2 57
StarCraft: Brood War
Aegong 978
Artosis 649
scan(afreeca) 37
Purpose 11
Counter-Strike
Stewie2K721
taco 410
Foxcn293
Other Games
summit1g7478
tarik_tv3691
Grubby2272
FrodaN2117
Sick355
C9.Mang0195
ViBE194
shahzam181
ToD175
Day[9].tv91
Mew2King48
PPMD31
Organizations
Other Games
BasetradeTV23
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• RyuSc2 47
• musti20045 35
• IndyKCrew
• Migwel
• sooper7s
• AfreecaTV YouTube
• intothetv
• Kozan
• LaughNgamezSOOP
StarCraft: Brood War
• Pr0nogo 1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota21937
League of Legends
• Doublelift4268
Counter-Strike
• Shiphtur172
Other Games
• imaqtpie1000
• Day9tv91
Upcoming Events
Replay Cast
50m
LiuLi Cup
11h 50m
MaxPax vs TriGGeR
ByuN vs herO
Cure vs Rogue
Classic vs HeRoMaRinE
Cosmonarchy
16h 50m
OyAji vs Sziky
Sziky vs WolFix
WolFix vs OyAji
Big Brain Bouts
16h 50m
Iba vs GgMaChine
TriGGeR vs Bunny
Reynor vs Classic
Serral vs Clem
BSL Team Wars
19h 50m
Team Hawk vs Team Dewalt
BSL Team Wars
19h 50m
Team Hawk vs Team Bonyth
Code For Giants Cup
23h 20m
SC Evo League
1d 12h
TaeJa vs Cure
Rogue vs threepoint
ByuN vs Creator
MaNa vs Classic
Maestros of the Game
1d 16h
ShoWTimE vs Cham
GuMiho vs Ryung
Zoun vs Spirit
Rogue vs MaNa
[BSL 2025] Weekly
1d 18h
[ Show More ]
SC Evo League
2 days
Maestros of the Game
2 days
SHIN vs Creator
Astrea vs Lambo
Bunny vs SKillous
HeRoMaRinE vs TriGGeR
BSL Team Wars
2 days
Team Bonyth vs Team Sziky
BSL Team Wars
2 days
Team Dewalt vs Team Sziky
Monday Night Weeklies
3 days
Replay Cast
4 days
Sparkling Tuna Cup
4 days
LiuLi Cup
5 days
Replay Cast
6 days
The PondCast
6 days
RSL Revival
6 days
Maru vs SHIN
MaNa vs MaxPax
Liquipedia Results

Completed

CSL Season 18: Qualifier 1
uThermal 2v2 Main Event
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
Acropolis #4 - TS1
CSL Season 18: Qualifier 2
SEL Season 2 Championship
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSL 2025 AUTUMN (S18)
LASL Season 20
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
RSL Revival: Season 2
Maestros of the Game
EC S1
Sisters' Call Cup
Skyesports Masters 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
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.