• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 20:51
CET 02:51
KST 10:51
  • 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
Greatest Players of All Time: Addendum - Dark10Team Liquid Map Contest #2312[ASL22] Finals Preview: Sweet Victory!12[ASL22] Ro4 Preview: Mirror Mirror6[ASL22] Ro8 Preview: Within Reach5
Community News
[BSL23] ProLeague RO83Serral wins 2026 RSL Season Finals12Weekly Cups (Nov 16-22): MaxPax doubles, Dark heats up0BSL 2v2 ProLeague Season 44Weekly Cups (Nov 9-15): Clem and herO take over6
StarCraft 2
General
About rush maps Best SC2 Parody Song about 2v2? Greatest Players of All Time: Addendum - Dark Serral wins 2026 RSL Season Finals How do you feel about the mass reverts in the 5.0.17 PTR?
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament Kung Fu Cup - 2026 Grand Finals (Nov 24-29) RSL goes to London! 2026 Offline Finals Nov 21-22 soO & FanTaSy return! SC2 Kevin Scrim 4v4 (Nov 16) ISSL:Premier#2 Announcement
Strategy
[H] ZvP Mid-Late Game: Stalkers Collossi HT
Custom Maps
[G] How to playtest arcade maps Starcraft 2 Advance [D] the control group Simple Questions/Answers
External Content
Mutation # 553 Undermined The PondCast: SC2 News & Results Mutation # 552 Secret Storm Mutation # 551 Robotic Revival
Brood War
General
New ASL23 Maps Fantasy Interview 2: Internal Rankings,SC2 swap BW General Discussion List of top players active on ShieldBattery SOOP Announces New Women's Monthly Tournament
Tourneys
[BSL23] ProLeague RO8 2v2v2v2 Tournament Stage 2: Players BSL 2v2 ProLeague Season 4 Ultimate Battle Event
Strategy
Request - 3-factory/fast timings as Terran Pluto's TvP 5Marine 2Medic Push Simple Questions, Simple Answers Infested Terran strategies in 2026
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread The PlayStation 5 Warcraft III: The Frozen Throne Free Space RTS Game, optimised f. Phone/Tablet etc
Dota 2
League of Legends
[TL LoL EUW IHs] Teemo shall perish
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Artificial Intelligence Thread The Chess Thread The Games Industry And ATVI Russo-Ukrainian War Thread
Fan Clubs
INnoVation Fan Club Fan Club Resource Thread
Media & Entertainment
Anime Discussion Thread Movie Discussion!
Sports
Football (Soccer) Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
[Kickstarter] The Roman E…
LUCKY_NOOB
On Parallel Lives in Fascis…
p4NDemik
The time I organised my…
AssyrianKing
Why I built Repalyzer (1.1.…
BlueStar
Innovate or Game Over?
TrAiDoS
ShieldBattery on Mac
Kraekkling
James Bond movies ranking - pa…
Topin
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 8891 users

The Big Programming Thread - Page 239

Forum Index > General Forum
Post a Reply
Prev 1 237 238 239 240 241 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.
smf
Profile Joined September 2010
Norway19 Posts
February 03 2013 19:51 GMT
#4761
On February 04 2013 04:32 Arnstein wrote:
For some reason I can't get my head around this. I visualize it like first you get xretning[0], and then you make yretning from 0 6, then you get xretning[1] and get the vertical yretning from 0-6. Is there a visualiser for C++ much like pythontutor.com?



Yes, you get yretning from 0-6 for each xretning, but you only move vertically at the cout << endl; which is executed outside the yretning loop => once for each xretning.
Kambing
Profile Joined May 2010
United States1176 Posts
February 03 2013 19:53 GMT
#4762
On February 04 2013 04:32 Arnstein wrote:
For some reason I can't get my head around this. I visualize it like first you get xretning[0], and then you make yretning from 0 6, then you get xretning[1] and get the vertical yretning from 0-6. Is there a visualiser for C++ much like pythontutor.com?



No visualizer that I know of, but if you plug in the comparable (Python 2.7) code to pythontutor.com (which is an awesome tool, happy you're using it):


tabell = [ [1 , 2 , 4 , 5, 6],
[7 , 8 , 9 , 10, 11],
[12, 13, 14, 15, 16],
[17, 18, 19, 20, 21],
[22, 23, 24, 25, 26],
[27, 28, 29, 30, 31],
[32, 33, 34, 35, 36] ]

for xretning in range(0, 5):
for yretning in range(0, 7):
print tabell[xretning][yretning],
print


You can trace it there (http://pythontutor.com/visualize.html). Highly recommend you do the tracing process on paper first to be able to concretely know where your logic differs from the actual logic.
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
February 03 2013 21:51 GMT
#4763
On February 04 2013 04:53 Kambing wrote:
Show nested quote +
On February 04 2013 04:32 Arnstein wrote:
For some reason I can't get my head around this. I visualize it like first you get xretning[0], and then you make yretning from 0 6, then you get xretning[1] and get the vertical yretning from 0-6. Is there a visualiser for C++ much like pythontutor.com?



No visualizer that I know of, but if you plug in the comparable (Python 2.7) code to pythontutor.com (which is an awesome tool, happy you're using it):


tabell = [ [1 , 2 , 4 , 5, 6],
[7 , 8 , 9 , 10, 11],
[12, 13, 14, 15, 16],
[17, 18, 19, 20, 21],
[22, 23, 24, 25, 26],
[27, 28, 29, 30, 31],
[32, 33, 34, 35, 36] ]

for xretning in range(0, 5):
for yretning in range(0, 7):
print tabell[xretning][yretning],
print


You can trace it there (http://pythontutor.com/visualize.html). Highly recommend you do the tracing process on paper first to be able to concretely know where your logic differs from the actual logic.


I see! You get an listindex out of range there, because it's the other way around! Thanks for taking your time to translate the code to Python!
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
iamke55
Profile Blog Joined April 2004
United States2806 Posts
February 04 2013 02:43 GMT
#4764
Would some C++ guru out there like to critique my merge sort? I started taking the Algorithms class on Coursera and they introduced the merge sort in week 1. Here is my implementation, all in 1 header file:

+ Show Spoiler +

#include <vector>
#include <iostream>
#include <algorithm>
#include <iterator>

template<typename T>
std::vector<T> merge(std::vector<T> v1, std::vector<T> v2)
{
typename std::vector<T>::const_iterator b1 = v1.begin(), e1 = v1.end(),
b2 = v2.begin(), e2 = v2.end();
typename std::vector<T>::size_type length = (e1 - b1 + e2 - b2);
std::vector<T> rVec;
rVec.reserve(length);

while(b1 != e1 && b2 != e2) {
if (*b1 < *b2) {
rVec.push_back(*b1++);
} else {
rVec.push_back(*b2++);
}
}

if (b1 == e1) {
std::copy(b2, e2, std::back_inserter(rVec));
} else {
std::copy(b1, e1, std::back_inserter(rVec));
}

return rVec;
}

template<typename T>
std::vector<T> mergeSort(std::vector<T> v)
{
typename std::vector<T>::iterator b = v.begin(), e = v.end();
typename std::vector<T>::size_type size = v.size();
if (size == 1) {
return v;
} else {
std::vector<T> v1(b,b + size / 2), v2(b + size / 2, e);
return merge(mergeSort(v1), mergeSort(v2));
}
}



Sorry if the format looks strange. I started using Emacs last week and still haven't figured out how to change the tab size from 2 to 4 spaces, though with the really long type names I kind of like the smaller indents. I am looking for any way I can improve the code both in terms of readability and performance.
During practice session, I discovered very good build against zerg. -Bisu[Shield]
Fyodor
Profile Blog Joined September 2010
Canada971 Posts
February 04 2013 05:18 GMT
#4765
On February 04 2013 11:43 iamke55 wrote:
Would some C++ guru out there like to critique my merge sort? I started taking the Algorithms class on Coursera and they introduced the merge sort in week 1. Here is my implementation, all in 1 header file:

+ Show Spoiler +

#include <vector>
#include <iostream>
#include <algorithm>
#include <iterator>

template<typename T>
std::vector<T> merge(std::vector<T> v1, std::vector<T> v2)
{
typename std::vector<T>::const_iterator b1 = v1.begin(), e1 = v1.end(),
b2 = v2.begin(), e2 = v2.end();
typename std::vector<T>::size_type length = (e1 - b1 + e2 - b2);
std::vector<T> rVec;
rVec.reserve(length);

while(b1 != e1 && b2 != e2) {
if (*b1 < *b2) {
rVec.push_back(*b1++);
} else {
rVec.push_back(*b2++);
}
}

if (b1 == e1) {
std::copy(b2, e2, std::back_inserter(rVec));
} else {
std::copy(b1, e1, std::back_inserter(rVec));
}

return rVec;
}

template<typename T>
std::vector<T> mergeSort(std::vector<T> v)
{
typename std::vector<T>::iterator b = v.begin(), e = v.end();
typename std::vector<T>::size_type size = v.size();
if (size == 1) {
return v;
} else {
std::vector<T> v1(b,b + size / 2), v2(b + size / 2, e);
return merge(mergeSort(v1), mergeSort(v2));
}
}



Sorry if the format looks strange. I started using Emacs last week and still haven't figured out how to change the tab size from 2 to 4 spaces, though with the really long type names I kind of like the smaller indents. I am looking for any way I can improve the code both in terms of readability and performance.

Just looking at it, I don't think caching "v.size()" makes sense. I think std::vector already holds its size in a variable so you don't gain any perf by caching. In fact it might be slightly worse perf wise.
llllllllllllllllllllllllllllllllllllllllllll
Shenghi
Profile Joined August 2010
167 Posts
Last Edited: 2013-02-05 18:53:34
February 05 2013 18:52 GMT
#4766
On February 04 2013 11:43 iamke55 wrote:
Would some C++ guru out there like to critique my merge sort? I started taking the Algorithms class on Coursera and they introduced the merge sort in week 1. Here is my implementation, all in 1 header file:

+ Show Spoiler +

#include <vector>
#include <iostream>
#include <algorithm>
#include <iterator>

template<typename T>
std::vector<T> merge(std::vector<T> v1, std::vector<T> v2)
{
typename std::vector<T>::const_iterator b1 = v1.begin(), e1 = v1.end(),
b2 = v2.begin(), e2 = v2.end();
typename std::vector<T>::size_type length = (e1 - b1 + e2 - b2);
std::vector<T> rVec;
rVec.reserve(length);

while(b1 != e1 && b2 != e2) {
if (*b1 < *b2) {
rVec.push_back(*b1++);
} else {
rVec.push_back(*b2++);
}
}

if (b1 == e1) {
std::copy(b2, e2, std::back_inserter(rVec));
} else {
std::copy(b1, e1, std::back_inserter(rVec));
}

return rVec;
}

template<typename T>
std::vector<T> mergeSort(std::vector<T> v)
{
typename std::vector<T>::iterator b = v.begin(), e = v.end();
typename std::vector<T>::size_type size = v.size();
if (size == 1) {
return v;
} else {
std::vector<T> v1(b,b + size / 2), v2(b + size / 2, e);
return merge(mergeSort(v1), mergeSort(v2));
}
}



Sorry if the format looks strange. I started using Emacs last week and still haven't figured out how to change the tab size from 2 to 4 spaces, though with the really long type names I kind of like the smaller indents. I am looking for any way I can improve the code both in terms of readability and performance.

I would pass the vector to be sorted into mergeSort as a reference instead and sort the given vector instead of creating and returning a new one. Usually you don't want to keep the unsorted vector anyway, and if you do then you can always choose to make a copy.

The same applies to the call to merge, where I would make v1 and v2 const references and merge directly into v.

Personally I also would stay away from std::copy and the iterator checks in preference of indexing, but I'm not sure how much difference that makes in practice.

Fyodor is correct in that storing the result of vector::size() is not necessary. Note however that this is not true for all containers.

I just so happened to be bored earlier today and wrote merge sort for the heck of it. Here's my code:
+ Show Spoiler [merge sort] +


template<typename T>
void merge(const std::vector<T> &a, const std::vector<T> &b, std::vector<T> &v)
{
size_t i = 0, j = 0, k = 0;
while (i < a.size() && j < b.size()) {
if (a[i] < b[j])
v[k++] = a[i++];
else
v[k++] = b[j++];
}
while (i < a.size())
v[k++] = a[i++];
while (j < b.size())
v[k++] = b[j++];
}

template<typename T>
void mergesort(std::vector<T> &v)
{
if (v.size() > 1) {
size_t mid = v.size() / 2;
std::vector<T> a(v.begin(), v.begin() + mid);
std::vector<T> b(v.begin() + mid, v.end());
mergesort(a);
mergesort(b);
merge(a, b, v);
}
}
People are not born stupid, they choose to be stupid. If you made that choice, please change your mind.
waxypants
Profile Blog Joined September 2009
United States479 Posts
Last Edited: 2013-02-06 11:38:05
February 06 2013 11:37 GMT
#4767
On February 03 2013 20:58 SevenShots wrote:
I've had a full class on functional programming with focus on haskell.
To be honest I still don't see what the whole buzz is about. I can't see real use to it other
than playing around and building some prototypes.


Have you ever been exposed to functional programming before? I've never used a functional language on something real (except for using some of the functional bits in python), but learning one was a great exercise because it forced me to think differently about a lot of problems, and I think it enhanced my problem-solving ability quite a bit. I think everyone should be exposed to at least one functional language.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
February 06 2013 14:51 GMT
#4768
On February 06 2013 20:37 waxypants wrote:
Show nested quote +
On February 03 2013 20:58 SevenShots wrote:
I've had a full class on functional programming with focus on haskell.
To be honest I still don't see what the whole buzz is about. I can't see real use to it other
than playing around and building some prototypes.


Have you ever been exposed to functional programming before? I've never used a functional language on something real (except for using some of the functional bits in python), but learning one was a great exercise because it forced me to think differently about a lot of problems, and I think it enhanced my problem-solving ability quite a bit. I think everyone should be exposed to at least one functional language.


Indeed.
Functional languages might not be THAT useful outside of university but learning them is still important because you learn a new way to think about problems that you often can use in other languages.

These days i'm programming a mixture of both object oriented and functional code, no matter the language.

A nice read about that is:
http://www.joelonsoftware.com/items/2006/08/01.html
iaretehnoob
Profile Joined June 2004
Sweden741 Posts
February 06 2013 17:44 GMT
#4769
On February 04 2013 11:43 iamke55 wrote:
Would some C++ guru out there like to critique my merge sort? I started taking the Algorithms class on Coursera and they introduced the merge sort in week 1. Here is my implementation, all in 1 header file:

+ Show Spoiler +

#include <vector>
#include <iostream>
#include <algorithm>
#include <iterator>

template<typename T>
std::vector<T> merge(std::vector<T> v1, std::vector<T> v2)
{
typename std::vector<T>::const_iterator b1 = v1.begin(), e1 = v1.end(),
b2 = v2.begin(), e2 = v2.end();
typename std::vector<T>::size_type length = (e1 - b1 + e2 - b2);
std::vector<T> rVec;
rVec.reserve(length);

while(b1 != e1 && b2 != e2) {
if (*b1 < *b2) {
rVec.push_back(*b1++);
} else {
rVec.push_back(*b2++);
}
}

if (b1 == e1) {
std::copy(b2, e2, std::back_inserter(rVec));
} else {
std::copy(b1, e1, std::back_inserter(rVec));
}

return rVec;
}

template<typename T>
std::vector<T> mergeSort(std::vector<T> v)
{
typename std::vector<T>::iterator b = v.begin(), e = v.end();
typename std::vector<T>::size_type size = v.size();
if (size == 1) {
return v;
} else {
std::vector<T> v1(b,b + size / 2), v2(b + size / 2, e);
return merge(mergeSort(v1), mergeSort(v2));
}
}



Sorry if the format looks strange. I started using Emacs last week and still haven't figured out how to change the tab size from 2 to 4 spaces, though with the really long type names I kind of like the smaller indents. I am looking for any way I can improve the code both in terms of readability and performance.


There's a couple of things you could do. The biggest thing style-wise would be to sort based on a start/end iterator pair, instead of hard-coding it for vector. This also means you can split your data without allocating new vectors. For performance, don't re-allocate rVec inside merge() every time, allocate a maximum size buffer once and pass (parts of) it around as needed. Then you could look into move semantics, to eliminate some more allocations, especially if you're sorting some complex data. Look at stable_sort in <algorithm>, to see how this would all come together.

Your code is pretty readable, I think some of the typenames are superfluous and you could use auto for the iterator variable declarations, aswell as begin(v)/end(v) instead of the vector members, even if it really doesn't matter here :p
ChrisXIV
Profile Blog Joined August 2010
Austria3553 Posts
February 06 2013 21:20 GMT
#4770
I want to start programming in C++, I already know Java. Now I need a (free) compiler that's good for beginners, I tried the Visual Studio one and that was just too much, I want something where I can just easily create a few classes, anything spring to mind?
"Just stay on 1 base, make a lot of shit, keep attacking. It doesn't work? Keep attacking." -Chill
Kambing
Profile Joined May 2010
United States1176 Posts
February 06 2013 21:46 GMT
#4771
On February 07 2013 06:20 ChrisXIV wrote:
I want to start programming in C++, I already know Java. Now I need a (free) compiler that's good for beginners, I tried the Visual Studio one and that was just too much, I want something where I can just easily create a few classes, anything spring to mind?


Make sure you distinguish compiler from IDE. On windows, your only real options for compilers are Microsoft's offering (Visual C++) or gcc via cygwin. What you probably mean is IDE in which case, no, there's no decent, non-complicated learning-level C++ IDE. If VS puts you off, then I recommend simply loading up a text editor and working off the command line as all the other IDEs out there approach similiar level of complexities. Other free windows IDEs for C++ include Eclipse CDT and Qt Creator.
MisterD
Profile Blog Joined June 2010
Germany1338 Posts
February 06 2013 21:51 GMT
#4772
On February 06 2013 23:51 Morfildur wrote:
Show nested quote +
On February 06 2013 20:37 waxypants wrote:
On February 03 2013 20:58 SevenShots wrote:
I've had a full class on functional programming with focus on haskell.
To be honest I still don't see what the whole buzz is about. I can't see real use to it other
than playing around and building some prototypes.


Have you ever been exposed to functional programming before? I've never used a functional language on something real (except for using some of the functional bits in python), but learning one was a great exercise because it forced me to think differently about a lot of problems, and I think it enhanced my problem-solving ability quite a bit. I think everyone should be exposed to at least one functional language.


Indeed.
Functional languages might not be THAT useful outside of university but learning them is still important because you learn a new way to think about problems that you often can use in other languages.

These days i'm programming a mixture of both object oriented and functional code, no matter the language.

A nice read about that is:
http://www.joelonsoftware.com/items/2006/08/01.html

the whole point about functional code is that it has less bugs. Most bugs stem from programmers not considering every single state their program can be in. Functional code solves this by simply not using state, and also has the added benefit of enabling parallel processing and super simple testing at no extra cost.

Of course though, you can't write most software without SOMEHOW storing or modeling state, and that can get really inconvenient really fast in purely functional languages. but that's fine because that should not be the goal. The goal is to write software most efficiently (and having to fix bugs counts as inefficient). So you write in functional code whatever can be comfortably written in functional code, to minimize the number of bugs involving these parts, and you use languages with easy handling of state for the parts where you need state. That's what's nice about languages that include both object oriented AND functional programming support, they allow you to do just that without any hassle of having to use multiple, different languages. The parts that need state you do in OO, and the parts that don't need state you do functional, and it all integrates seamlessly.

Learning functional programming in this sense mostly serves to teach you the difference between pure functions and functions with state and side effects. Only by knowing what you need to avoid can you keep state from affecting certain functions, and only by knowing where functional programming really starts to hurt can you make sound decisions on when to switch to using state. So hint from me, don't consider functional programming as the goal, but as a tool with benefits and drawbacks, and by learning it you learn to adjust your decision process on where what kind of code is used best.
Gold isn't everything in life... you need wood, too!
ChrisXIV
Profile Blog Joined August 2010
Austria3553 Posts
February 06 2013 21:58 GMT
#4773
On February 07 2013 06:46 Kambing wrote:
Show nested quote +
On February 07 2013 06:20 ChrisXIV wrote:
I want to start programming in C++, I already know Java. Now I need a (free) compiler that's good for beginners, I tried the Visual Studio one and that was just too much, I want something where I can just easily create a few classes, anything spring to mind?


Make sure you distinguish compiler from IDE. On windows, your only real options for compilers are Microsoft's offering (Visual C++) or gcc via cygwin. What you probably mean is IDE in which case, no, there's no decent, non-complicated learning-level C++ IDE. If VS puts you off, then I recommend simply loading up a text editor and working off the command line as all the other IDEs out there approach similiar level of complexities. Other free windows IDEs for C++ include Eclipse CDT and Qt Creator.

Ah yes, IDE, don't know why I keep forgetting that word.

Hm, that sucks. It's just that clicking through all those options in VS with no idea what they do...oh well, text editor it is, thank you.
"Just stay on 1 base, make a lot of shit, keep attacking. It doesn't work? Keep attacking." -Chill
Kambing
Profile Joined May 2010
United States1176 Posts
February 06 2013 22:10 GMT
#4774
On February 07 2013 06:58 ChrisXIV wrote:
Show nested quote +
On February 07 2013 06:46 Kambing wrote:
On February 07 2013 06:20 ChrisXIV wrote:
I want to start programming in C++, I already know Java. Now I need a (free) compiler that's good for beginners, I tried the Visual Studio one and that was just too much, I want something where I can just easily create a few classes, anything spring to mind?


Make sure you distinguish compiler from IDE. On windows, your only real options for compilers are Microsoft's offering (Visual C++) or gcc via cygwin. What you probably mean is IDE in which case, no, there's no decent, non-complicated learning-level C++ IDE. If VS puts you off, then I recommend simply loading up a text editor and working off the command line as all the other IDEs out there approach similiar level of complexities. Other free windows IDEs for C++ include Eclipse CDT and Qt Creator.

Ah yes, IDE, don't know why I keep forgetting that word.

Hm, that sucks. It's just that clicking through all those options in VS with no idea what they do...oh well, text editor it is, thank you.


C++, moreso than any other language, "requires" an IDE or cohesive set of command line tools to do real development in. That being said, those things tend to impede you from learning the fundamentals, so it's good that you aren't afraid of using the basic tools to start. =)
SXGCoil
Profile Joined February 2012
United States341 Posts
Last Edited: 2013-02-06 22:59:25
February 06 2013 22:58 GMT
#4775
Hey, I'm a junior in high school looking to study computer science at college.
At the moment, I'd like to specialize in web design but I feel like I need more information.
I've never been a very artistic person(as in actual painting/drawing) and I'd like to know how important knowledge of art is in web design.
The web design class I'm taking in school isn't really advanced so I really have learned a large amount about it yet.

Also how developed is the job market for comp sci majors? I assume it's a rather in-demand field.
DumJumJmyWum
Profile Joined March 2011
United States75 Posts
Last Edited: 2013-02-06 23:28:13
February 06 2013 23:25 GMT
#4776
On February 07 2013 07:58 Brawny wrote:
Hey, I'm a junior in high school looking to study computer science at college.
At the moment, I'd like to specialize in web design but I feel like I need more information.
I've never been a very artistic person(as in actual painting/drawing) and I'd like to know how important knowledge of art is in web design.
The web design class I'm taking in school isn't really advanced so I really have learned a large amount about it yet.

Also how developed is the job market for comp sci majors? I assume it's a rather in-demand field.


The job market for comp sci majors is great provided you become good at it. There are so many field to get into as well with this major. Doing your own projects is a must imo, because some schools are mainly theoretical and don't teach you actually how to use tools and build a product. It also helps you find your passion.

As for getting a job doing web "stuff", you should make the distinction between web development and web design. What you're most likely doing in school is web design (like you said), which is less about programming and comp sci stuff as it is making pretty stuff. This involves making mock-ups using photoshop, learning html/css/javascript to display them. This is also referred to as "front-end". This is the creative stuff and artsy part, but less technical and usually paid less.

Web development usually refers to the back-end. This is the server-side which involves writing programs on the server (such as Tomcat, Amazon AWS, Google App Engine, Heroku) with languages such as Java,Python, Ruby, and PHP. This is what the hard programming and comp sci stuff usually refers to. I'd recommend going through Udacity's Web Development course. It gives you a good overview of everything without overwhelming you.

Also, there are new job positions called "User experience/User Interface (UX.UI) engineers" popping up which blur the line between front-end and back-end, but in my opinion requires a lot of experience. I think you're looking more for the web development side, but it's still important to how these things work.

Finally, it's worth mentioning that the title "software engineer" can be used to describe both of these positions or someone who does both front-end and back-end.

If you have more questions feel free to pm me

uZr
Profile Joined April 2011
20 Posts
February 06 2013 23:43 GMT
#4777
On February 06 2013 23:51 Morfildur wrote:
Indeed.
Functional languages might not be THAT useful outside of university but learning them is still important because you learn a new way to think about problems that you often can use in other languages.

Beside being really important to learn, functional languages are really used, and you're exposed to devices operating with them on a daily basis.
Just look around on google for erlang, the OTP, etc (i was actually really surprised when i was asked to write erlang -- actually learnt it as we were taught haskell in classes -- during an internship at one of our ISP).
Funniest program i know which is written in erlang: Wings 3D, yup that's right, a 3D Polygon modeler :D
As any language, it's just about using the language that fits the work you wanna do the best (aka increase productivity/stability/efficiency as much as possible).
+ Show Spoiler +
Hell people still program in COBOL, i guess theres more with it than just "everything we have is in COBOL"
Craton
Profile Blog Joined December 2009
United States17305 Posts
Last Edited: 2013-02-06 23:53:01
February 06 2013 23:50 GMT
#4778
The general (overly broad) IT field is growing like 2-2.5x faster than the 'average.' The pay scale is also quite good. Entry level is around 50k for a software developer and the median is around 90k ($40 / hr).

[image loading]

http://www.bls.gov/ooh/Computer-and-Information-Technology/Software-developers.htm
twitch.tv/cratonz
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
Last Edited: 2013-02-07 02:17:12
February 07 2013 02:16 GMT
#4779
I'm having a bit of trouble to understand C memory management. Could you please show me an easy to understand guide? What I also need is perhaps some practical examples where it's crucial to deal with memory instead of stack.

Thanks
Arnstein
Profile Blog Joined May 2010
Norway3381 Posts
February 07 2013 07:35 GMT
#4780
On February 07 2013 06:58 ChrisXIV wrote:
Show nested quote +
On February 07 2013 06:46 Kambing wrote:
On February 07 2013 06:20 ChrisXIV wrote:
I want to start programming in C++, I already know Java. Now I need a (free) compiler that's good for beginners, I tried the Visual Studio one and that was just too much, I want something where I can just easily create a few classes, anything spring to mind?


Make sure you distinguish compiler from IDE. On windows, your only real options for compilers are Microsoft's offering (Visual C++) or gcc via cygwin. What you probably mean is IDE in which case, no, there's no decent, non-complicated learning-level C++ IDE. If VS puts you off, then I recommend simply loading up a text editor and working off the command line as all the other IDEs out there approach similiar level of complexities. Other free windows IDEs for C++ include Eclipse CDT and Qt Creator.

Ah yes, IDE, don't know why I keep forgetting that word.

Hm, that sucks. It's just that clicking through all those options in VS with no idea what they do...oh well, text editor it is, thank you.


I prefer CodeBlocks to Visual C++. You can also install Visual C++ Express instead of that whole Visual Studio package. Visual C++ is much more lightweight(I think, I haven't tried Studio). But check out CodeBlocks. You can also install a compiler, and write your code in Sublime Text and compile it in the command line. (Sublime Text might be able to compile, I don't know)
rsol in response to the dragoon voice being heard in SCII: dragoon ai reaches new lows: wanders into wrong game
Prev 1 237 238 239 240 241 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 9h 9m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ProTech114
StarCraft: Brood War
NaDa 40
Terrorterran 24
LuMiX 1
Dota 2
NeuroSwarm3
Other Games
summit1g10530
tarik_tv5071
Doublelift3287
JimRising 419
Mew2King42
Organizations
Other Games
gamesdonequick791
[ Show 10 non-featured ]
StarCraft 2
• Hupsaiya 74
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• Scarra995
Upcoming Events
Kung Fu Cup
9h 9m
Solar vs Rogue
herO vs TBD
BSL
18h 9m
Kyrie vs JDConan
Dewalt vs eOnzErG
Replay Cast
21h 9m
WardiTV Weekly
1d 10h
Ultimate Battle
1d 10h
Sparkling Tuna Cup
2 days
PiGosaur Cup
2 days
The PondCast
4 days
KCM Race Survival
4 days
Replay Cast
4 days
[ Show More ]
CranKy Ducklings
6 days
Liquipedia Results

Completed

Sijosae Cup
RSL Offline Finals
Underdog Cup 2026 Div 2-3

Ongoing

Acropolis #5
KCM Race Survival 2026 Season 4
International ShieldBattery League
BSL Season 23
IPSL Winter 2026-27
CSL Season 23: Qualifier 1
Sector 591
CSL Season 23: Qualifier 2
Kung Fu Cup 2026 Grand Finals
Calamity Cup Div. A Season 8
PGL Major Singapore 2026
Stake Ranked Episode 6
BLAST Rivals Fall 2026
IEM Beijing 2026
PGL Masters Bucharest 2026
Stake Ranked Episode 5
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026

Upcoming

YSL S4
SC4ALL II: Brood War
CSL 2026 Winter (S23) - 3v3
CSL 2026 Winter (S23)
NBSL 2026 Xiamen LAN
BSL 23: Non-Korean Championship
BSL 2v2 Season 4
HSC XXX
Stellar Fest 2: Lunar Cup
StarCraft2 Weekly Open Tournament 2026 Grand Finals
SC4ALL II: StarCraft II
PGL Cluj-Napoca 2027
IEM Kraków 2027
PGL Bucharest 2027
BLAST Bounty Winter 2027
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.