• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:15
CEST 18:15
KST 01:15
  • 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
[ASL21] Ro8 Preview Pt2: Progenitors8Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists22
Community News
Weekly Cups (April 27-May 4): Clem takes triple0RSL Revival: Season 5 - Qualifiers and Main Event11Code S Season 1 (2026) - RO12 Results12026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced9
StarCraft 2
General
Weekly Cups (April 27-May 4): Clem takes triple Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Code S Season 1 (2026) - RO12 Results Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun Team Liquid Map Contest #22 - The Finalists
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament RSL Revival: Season 5 - Qualifiers and Main Event StarCraft Evolution League (SC Evo Biweekly) 2026 GSL Season 2 Qualifiers $1,400 SEL Season 3 Ladder Invitational
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 524 Death and Taxes The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base
Brood War
General
AI Question ASL21 General Discussion Using AI to optimize marketing campaigns [ASL21] Ro8 Preview Pt2: Progenitors Why there arent any 256x256 pro maps?
Tourneys
[ASL21] Ro8 Day 4 [ASL21] Ro8 Day 3 [Megathread] Daily Proleagues [ASL21] Ro8 Day 2
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV OutLive 25 (RTS Game) Daigo vs Menard Best of 10 Nintendo Switch Thread
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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 European Politico-economics QA Mega-thread Russo-Ukrainian War Thread 3D technology/software discussion Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [Req][Books] Good Fantasy/SciFi books
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Movie Stars In Video Games: …
TrAiDoS
ramps on octagon
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 854 users

The Big Programming Thread - Page 467

Forum Index > General Forum
Post a Reply
Prev 1 465 466 467 468 469 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.
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
Last Edited: 2014-04-12 21:48:33
April 12 2014 21:44 GMT
#9321
I use it all the time in MUD development (MMO without graphics) so I guess it'll be useful practically anywhere where you need multiple objects derived from the same base class but being distinct in some way (sword and axe are both weapons but they're completely different in the terms of mechanics, just like helmet needs different stuff than chainmail or shield even though they're all armours and further down the line they're all objects (not in the sense of program objects, literal objects like candle, coin etc.)).
Time is precious. Waste it wisely.
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
April 13 2014 01:35 GMT
#9322
On April 13 2014 05:23 Nesserev wrote:
Show nested quote +
On April 13 2014 04:10 obesechicken13 wrote:
All right. I've got a Software Engineering Exam on Tuesday. Can someone explain to me what an Abstract Factory is?

I was reading page 32 here and what I understand so far is that it uses abstractions. But I don't understand the diagram below page 32. If this can be explained with skype, I'll pm you my skype id.

Also the examples they give for Interface segregation are kind of confusing. (Page 14). Can someone explain that too? Does that mean that the different client interfaces are for different users like how an educational website might have interface classes for a teacher, student, and administrator (assuming the server side language was object oriented)?

http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)

In this source they say that it's better to have one responsibility per class. I can agree with this. But why don't they have one class for drawing shapes and one class for defining rectangles. Instead they have one class for drawing only rectangles and one class for defining a rectangle's geometry.

Doesn't that mean they would be making a different drawer for every shape?



After that I'll probably need some help with Cascading (Is this similar to cascading deletes for DB?) and Facade but I'll ask later after I've done more reading.
Are there any good videos I need to watch about creational patterns, structural design patterns, or behavioral patterns?

Secondly, the Interface Segregation:
So, basically, what it comes down to, is that in the first example, every method that is used by the clients is part of one big Service class.

In the second example, every method that is used by a certain type of client, is put in a client specific class/interface. In the end, the Service class inherits all those specific classes/interfaces.

Thanks for all the help guys. This part is still bugging me, shouldn't the client derive its functionality from some contract with the server/service? Because there is only one service and many clients.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2014-04-13 02:37:39
April 13 2014 02:29 GMT
#9323
--- Nuked ---
obesechicken13
Profile Blog Joined July 2008
United States10467 Posts
Last Edited: 2014-04-13 04:07:09
April 13 2014 04:06 GMT
#9324
On April 13 2014 11:29 Nesserev wrote:
Show nested quote +
On April 13 2014 10:35 obesechicken13 wrote:
On April 13 2014 05:23 Nesserev wrote:
Secondly, the Interface Segregation:
So, basically, what it comes down to, is that in the first example, every method that is used by the clients is part of one big Service class.

In the second example, every method that is used by a certain type of client, is put in a client specific class/interface. In the end, the Service class inherits all those specific classes/interfaces.

Thanks for all the help guys. This part is still bugging me, shouldn't the client derive its functionality from some contract with the server/service? Because there is only one service and many clients.

Well, that's what happens, the client derives its functionality from ITS contract with the server/service, BUT the service derives its interface from ALL of its contracts with clients.

I'll try to explain this in an abstract way via browsers (client) and servers(service), but I only have a basic understanding of how browsers work, so I hope I don't make (m)any mistakes:

Not all browsers support the same features, should this be a reason for all of them to use different services?
For example:
- All browsers are able to get pages, ofc.
- Browsers A and B both support text
- Browser A also supports images, while Browser B doesn't
- Browser A doesn't support videos, but Browser B does

So, the interfaces of browsers A and B should look like this:
Browser A: getPage, getText, getImage
Browser B: getPage, getText, getVideo

The interfaces serverside for every client individually would be (these are separate classes, will function as base classes)
Interface for A: sendPage, sendText, sendImage
Interface for B: sendPage, sendText, sendVideo

Now we unite those serverside interfaces into one service (Service class is derived from those base classes)
Service : sendPage, sendText, sendImage, sendVideo

I hope this helps a bit?

DISCLAIMER: I'm tired; it's 4:XX am in the morning; I don't want a technical discussion like the one 20-30 pages ago about multiple inheritance and the "dreaded" diamond of dead, because I used an example to explain the concept and nothing more.

I think this makes sense. I'm still trying to wrap my head around concrete classes inheriting from abstract classes and this whole dependency inversion principle. Every little bit helps.
I think in our modern age technology has evolved to become more addictive. The things that don't give us pleasure aren't used as much. Work was never meant to be fun, but doing it makes us happier in the long run.
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
April 13 2014 18:45 GMT
#9325
Ok, I've run into some stupid C# problem. I'm a complete newbie with C# so please bear that in mind before laughing too hard:


public string Date {get; set;} // this is being set externally to either YYYY-MM-DD or " "-" "-" " (whitespace in place of numbers)
private string[] dateCheck;

public void Configure() // being invoked externally, it sets the Date first then calls this method
{
dateCheck = Date.Split('-'); // this gives me a null reference error so I can't proceed

if (String.IsNullorWhitespace(dateCheck[0]))
{
Date = String.Empty; // get rid of whitespace and hyphens if there's nothing to show
}
}


I'm aware that my if check is probably complete garbage and will have to change it but I have no idea why does it throw an error when assigning the value to dateCheck (I have code that does exactly the same thing in another class and it works flawlessly).

Any help is appreciated.
Time is precious. Waste it wisely.
Ame
Profile Joined October 2009
United States246 Posts
April 13 2014 18:46 GMT
#9326
So I'm running Sieve of Eratosthenes and notice it takes a big hit to speed (on my laptop, was 'average' about 5 years ago) as the number to search to rises.

for (int i = 0; i < primeSieve.length; i++)
{
if (!marked[i])
{
primeList.add(primeSieve[i]);
//conditional print statement goes here sometimes
if (primeSieve[i] < Math.sqrt(n))
{
for (int j = primeSieve[i]*primeSieve[i]; j <= n; j+=2*primeSieve[i])
{
marked[(j/2)-1] = true;
}
}
}
}


It's where the slowdown occurs that confuses me. With a cap of around n = 400m, it starts to really slow down around primeSieve[i] ~ 350m. At this point primeSieve[i] is way larger than sqrt(400m), so all that should be happening is check if marked[i] is true/false (boolean array) and then adding it to primeList (ArrayList<Integer>, size() at {primeSieve[i] = 350m} around 19m, init to be such that it never needs to be resized).

If I throw a 'print last prime' statement, it looks the program starts stuttering (prints out blocks of primes, freezes/waits about 5 seconds, prints out another block, etc) with the blocks printing out shrinking in size (towards the end before I stopped the program, it would only print out blocks of about 50 primes before freezing). Task Manager during runtime shows CPU usage ~99% and Physical Memory ~95% :|

It works fine up to n = 350m, ~doubling in run time between n = 150m (15 seconds) and n = 350m (30 seconds). But at 400m it goes LOLNO and runs for over 5-10 minutes before I cut it off. During the 400m run it still spits out primes through 350m fairly quickly (under a minute) before afking past 350m. JVM ran with heap size arguments to handle arrays and ArrayList.

Any idea what this might be or what I should be googling to find out more? Is this some crazy memory access thing?
Millitron
Profile Blog Joined August 2010
United States2611 Posts
April 13 2014 19:29 GMT
#9327
I'm not familiar with the Sieve of Eratosthenes, but is it possible that at around 350m primeSieve is over 2 billion? If primeSieve rolls over, you're screwed and stuck in the second for loop forever.

As for the weird printing, I think that's an artifact of system.out.print. Printing to the screen is horribly slow compared to doing math.
Who called in the fleet?
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2014-04-13 19:35:50
April 13 2014 19:33 GMT
#9328
On April 14 2014 03:45 Manit0u wrote:
Ok, I've run into some stupid C# problem. I'm a complete newbie with C# so please bear that in mind before laughing too hard:


public string Date {get; set;} // this is being set externally to either YYYY-MM-DD or " "-" "-" " (whitespace in place of numbers)
private string[] dateCheck;

public void Configure() // being invoked externally, it sets the Date first then calls this method
{
dateCheck = Date.Split('-'); // this gives me a null reference error so I can't proceed

if (String.IsNullorWhitespace(dateCheck[0]))
{
Date = String.Empty; // get rid of whitespace and hyphens if there's nothing to show
}
}


I'm aware that my if check is probably complete garbage and will have to change it but I have no idea why does it throw an error when assigning the value to dateCheck (I have code that does exactly the same thing in another class and it works flawlessly).

Any help is appreciated.




if (Date != null) {
dateCheck = Date.split('-');
...
} else {
Console.WriteLine("Date not set.");
}



Your Date value is not being set. Should probably put a breakpoint there and check all your values to see if everything's what you expect..
There is no one like you in the universe.
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
April 13 2014 19:42 GMT
#9329
The thing is, the date was being set. I solved it by making the check in a different class though (before strings are joined with -).
Time is precious. Waste it wisely.
whiteLotus
Profile Blog Joined July 2009
1833 Posts
Last Edited: 2014-04-13 20:05:50
April 13 2014 19:58 GMT
#9330
just a dumb question, is it theoretically possible to actually learn programming through google, various online courses and tutorials, like lets say java,php,jq, maybe some python or C, and actually get a job as a web programmer or smth at some shitty ass company, or you would still ideally need some university courses like advanced math and shit? i dont mean anything like software developer at Blizzard or anything like that lol.
The bird of Hermes is my name, eating my wings to make me tame
cha0
Profile Joined March 2010
Canada512 Posts
April 13 2014 20:15 GMT
#9331
On April 14 2014 04:58 whiteLotus wrote:
just a dumb question, is it theoretically possible to actually learn programming through google, various online courses and tutorials, like lets say java,php,jq, maybe some python or C, and actually get a job as a web programmer or smth at some shitty ass company, or you would still ideally need some university courses like advanced math and shit? i dont mean anything like software developer at Blizzard or anything like that lol.


Anything is possible, even the word impossible is just saying "I'm possible"

On a serious note, yes you can. It is hard and you'll need to have a lot of your own work to show to get noticed since most companies will always look for a degree but with a well maintained portfolio along with really knowing your stuff (Going through the online courses properly and not just skimming through them) you could learn to program and get webdev job. It won't be a walk in the park, but neither is finding a job even with a CS degree.
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
April 13 2014 20:23 GMT
#9332
On April 14 2014 04:58 whiteLotus wrote:
just a dumb question, is it theoretically possible to actually learn programming through google, various online courses and tutorials, like lets say java,php,jq, maybe some python or C, and actually get a job as a web programmer or smth at some shitty ass company, or you would still ideally need some university courses like advanced math and shit? i dont mean anything like software developer at Blizzard or anything like that lol.

You certainly can become good enough, the question is whether you can get an invitation to an interview. The majority of my knowledge is from the internet and books, university was a painful waste of time.
Proof techniques, combinatorics and matrices are pretty much the only things I learnt at univeristy and consider relevant. For comp sci stuff, it was far more efficient to just read it up myself.

But I don't know how good universities are where you live, and having a piece of paper saying "I provably spent some time on learning moderately relevant stuff" is rather effective for getting a job.
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: 2014-04-13 20:35:00
April 13 2014 20:34 GMT
#9333
On April 14 2014 03:46 Ame wrote:
So I'm running Sieve of Eratosthenes and notice it takes a big hit to speed (on my laptop, was 'average' about 5 years ago) as the number to search to rises.

for (int i = 0; i < primeSieve.length; i++)
{
if (!marked[i])
{
primeList.add(primeSieve[i]);
//conditional print statement goes here sometimes
if (primeSieve[i] < Math.sqrt(n))
{
for (int j = primeSieve[i]*primeSieve[i]; j <= n; j+=2*primeSieve[i])
{
marked[(j/2)-1] = true;
}
}
}
}


It's where the slowdown occurs that confuses me. With a cap of around n = 400m, it starts to really slow down around primeSieve[i] ~ 350m. At this point primeSieve[i] is way larger than sqrt(400m), so all that should be happening is check if marked[i] is true/false (boolean array) and then adding it to primeList (ArrayList<Integer>, size() at {primeSieve[i] = 350m} around 19m, init to be such that it never needs to be resized).

If I throw a 'print last prime' statement, it looks the program starts stuttering (prints out blocks of primes, freezes/waits about 5 seconds, prints out another block, etc) with the blocks printing out shrinking in size (towards the end before I stopped the program, it would only print out blocks of about 50 primes before freezing). Task Manager during runtime shows CPU usage ~99% and Physical Memory ~95% :|

It works fine up to n = 350m, ~doubling in run time between n = 150m (15 seconds) and n = 350m (30 seconds). But at 400m it goes LOLNO and runs for over 5-10 minutes before I cut it off. During the 400m run it still spits out primes through 350m fairly quickly (under a minute) before afking past 350m. JVM ran with heap size arguments to handle arrays and ArrayList.

Any idea what this might be or what I should be googling to find out more? Is this some crazy memory access thing?


So wild guess - I might be really wrong - but on an old system with 2GB of RAM the max you'd be able to fit in RAM even with nothing else happening at all would be like 500 million ints or so, meaning that other things could reasonably eat up a couple hundred million of those spaces, leaving you with room for 300 million ints in memory before you started requiring a LOT of disk accesses, which would totally destroy your performance.
Ame
Profile Joined October 2009
United States246 Posts
April 13 2014 21:03 GMT
#9334
On April 14 2014 04:29 Millitron wrote:
I'm not familiar with the Sieve of Eratosthenes, but is it possible that at around 350m primeSieve is over 2 billion? If primeSieve rolls over, you're screwed and stuck in the second for loop forever.

As for the weird printing, I think that's an artifact of system.out.print. Printing to the screen is horribly slow compared to doing math.


Whoops, some clarity: by 350m primeSieve, I meant the integer is ~350,000,000, so not worried about overflow yet, at least I don't think. And yea, I've run into the system.out.print being slow a bit back when I noticed run time went from minutes to seconds or something ridic by cutting out printing during steps the first time I tried to throw together a prime generator. :p

Still ran for over 5 minutes of nothing before I cut out without the print statements, so I don't think it was printing alone. I mainly threw in printing to make sure the ranges were still in values expected for the loop (checking for overflow) and to see where performance started taking a hit (the 350m figure).

On April 14 2014 05:34 Cyx. wrote:
So wild guess - I might be really wrong - but on an old system with 2GB of RAM the max you'd be able to fit in RAM even with nothing else happening at all would be like 500 million ints or so, meaning that other things could reasonably eat up a couple hundred million of those spaces, leaving you with room for 300 million ints in memory before you started requiring a LOT of disk accesses, which would totally destroy your performance.


I had a vague notion that it might have been a reason like this, but before now haven't read too much into RAM vs disk access/etc.. With your guess I will be doing so now.

+ Show Spoiler [Ramblings] +

Other details for fun: laptop system claims 4GB, but no idea how much of that Java can probably access. Having to use <Integer> in ArrayList instead of being able to use int probably adds decent bit of memory overhead, and other inefficiencies I have sound enough to push things out of RAM into disk anyways. Without some trickery (reading up on partitioned sieves and stuff), looks like I'm actually approaching the limit of how many primes I can generate gg.

Original problem was actually just to check if a list of arbitrary large numbers were prime, so turns out using BigInteger.probablePrime() ending up being a way faster solution (well not really arbitrary and there's probably some really fancy mathematical way to do it, but math). Now just to code my own version of Miller Rabin, hue.

bangsholt
Profile Joined June 2011
Denmark138 Posts
April 13 2014 21:39 GMT
#9335
On April 14 2014 04:42 Manit0u wrote:
The thing is, the date was being set. I solved it by making the check in a different class though (before strings are joined with -).


Why are you not converting the string date into a DateTime or something similar as soon as you can? You can always get the string representation at a later point - or even use Humanizer, if it's to show for a user.

http://www.hanselman.com/blog/NuGetPackageOfTheWeekHumanizerMakesNETDataTypesMoreHuman.aspx
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
Last Edited: 2014-04-13 23:52:33
April 13 2014 21:43 GMT
#9336
On April 14 2014 05:23 spinesheath wrote:
Show nested quote +
On April 14 2014 04:58 whiteLotus wrote:
just a dumb question, is it theoretically possible to actually learn programming through google, various online courses and tutorials, like lets say java,php,jq, maybe some python or C, and actually get a job as a web programmer or smth at some shitty ass company, or you would still ideally need some university courses like advanced math and shit? i dont mean anything like software developer at Blizzard or anything like that lol.

You certainly can become good enough, the question is whether you can get an invitation to an interview. The majority of my knowledge is from the internet and books, university was a painful waste of time.
Proof techniques, combinatorics and matrices are pretty much the only things I learnt at univeristy and consider relevant. For comp sci stuff, it was far more efficient to just read it up myself.

But I don't know how good universities are where you live, and having a piece of paper saying "I provably spent some time on learning moderately relevant stuff" is rather effective for getting a job.


It all depends. I have a friend who quit uni because he couldn't be bothered with this kind of stuff and now is a top notch programmer working for big companies (Symantec, Oracle and such). What's most important in this business is the experience, nothing beats that. You can learn all you want from books/courses/studies but at the end of the day it all comes down to 'Are you experienced enough to do it without really thinking about it?'. That's the feeling I get when I'm asking my friends who are established programmers for some help. They're able to solve the problems that take me several hours in 5 minutes and do it way more efficiently and elegantly than I could ever hope to do now. Because they all have 10+ years in doing this stuff under their belts they know the realities, all the design patterns and best ways to do things inside out.

I'm pretty much in your position right now. I want to change my job and move to a completely different sector. I know some general OOP, I understand the code pretty well and can do most of the basic/intermediate stuff in any of the C-family languages (C, C#, C++, Java, PHP, Python, LPC - I did some minor freelance stuff in all of them) but getting a real job is a different story entirely.

Stuff you MUST know (because that's what they'll ask you for in 90% of job interviews even for an internship):
- at least one framework (in case of PHP/Python)
- UML and design patterns
- at least one version control system (git and svn are the most common)
- pretty good overall knowledge of the language, associated libraries etc.
- in case of PHP/Python they'll also require some knowledge of JS/CSS/HTML most of the time and SQL every time

During my interviews I've found out that they're not really interested in 'if you can do it' but rather 'if you can do it the way they want you to'.

That's actually a lot of stuff to learn by yourself, but it's doable if you don't go too broad (like I did) but instead pick something popular and go deep with that first, branching out will be easier when you've mastered it.

For PHP/webdev you would need:
0. General PHP - including PDO, MVC and OO stuff in PHP
1. Zend framework - pretty popular and relatively easy to get into, unlike say Symfony
2. MySQL - databases are a must
3. Some JS/CSS/HTML - CSS/HTML are pretty easy, JS shouldn't be much of a trouble if you get a hang on PHP
4. GIT
5. Design patterns for PHP

This package should get you a job no problem. After the first job it should be easier since you'll be able to score some experience and build up your portfolio.

Just some food for thought.
Time is precious. Waste it wisely.
CatNzHat
Profile Blog Joined February 2011
United States1599 Posts
April 14 2014 07:12 GMT
#9337
On April 14 2014 04:58 whiteLotus wrote:
just a dumb question, is it theoretically possible to actually learn programming through google, various online courses and tutorials, like lets say java,php,jq, maybe some python or C, and actually get a job as a web programmer or smth at some shitty ass company, or you would still ideally need some university courses like advanced math and shit? i dont mean anything like software developer at Blizzard or anything like that lol.

Not a dumb question, and it is most certainly possible as I did it myself. Ideally you would take some math and data structures/algorithms courses (as I did at a local junior college). I'm working alongside some ivy league graduates (Cornell), we get paid on the same scale.

As far as working for Blizzard or other corporate companies it's just a bit trickier to get started. For the last 5 years I've worked at startups around the bay area, so it's easier for me to get interviews at other startups than at big companies like Google/Apple/LinkedIn.

You absolutely need to know your data structures and algorithms to be a successful software engineer anywhere. Learning languages, frameworks and APIs is secondary to that. I've done phone screens with a ton of engineers with good looking resumes that list relevant technologies, but then when I ask them a stupidly simple question (like what's the difference between a stack and a queue, or hash vs array) and they can't come up with anything.

If you really think that you want to be a software engineer then I recommend you find an intro to CS class online (I think UC Berkeley has published a video version of theirs, as has MIT). Follow along with every exercise, use google to figure out how things work if you don't understand, and then find yourself the data structures and algorithms class and do the same.

After if you're still interested you should have a better idea of a direction you want to go, and some things that you want to learn. If you're leaning to the web side then take a class on databases. There's a lot to learn there about mapping out an application to a relational database, and how to ensure performance and scalability. You should be able to build yourself a neat little Rails/Django/Express app afterwards, maybe integrate with some web APIs. If you're really engaged with this then you'll probably find yourself wanting to learn more about javascript, one of the better books to read on the subject is Douglas Crockford's Javascript: The good parts.

If you're interested in the mobile application development side then find a class on objective C or java for android and build yourself a neat little app.

I'd recommend you test cover your personal projects, you'll force yourself to write better code (untestable code is bad code) and when you go to show it off in an interview you'll get big bonus points. I've interviewed people who say they like testing and have experience with TDD, but then show us personal projects with zero test coverage. It's a big turn off to see someone talk the talk but not walk the walk, and even more so since we require everyone to test cover their code.

TL;DR: Yes, I did it.
LaNague
Profile Blog Joined April 2010
Germany9118 Posts
Last Edited: 2014-04-14 12:16:21
April 14 2014 12:13 GMT
#9338
On April 14 2014 04:58 whiteLotus wrote:
just a dumb question, is it theoretically possible to actually learn programming through google, various online courses and tutorials, like lets say java,php,jq, maybe some python or C, and actually get a job as a web programmer or smth at some shitty ass company, or you would still ideally need some university courses like advanced math and shit? i dont mean anything like software developer at Blizzard or anything like that lol.


i dont know how it is in other countries, but "programmer" is actually not a university profession in germany, its an apprenticeship thing on a school level.
You can learn programming with books for sure, i did when i was a kid.


But the whole design part and scientific thinking that you need for complex problems is hard to aquire without someone teaching you.
misirlou
Profile Joined June 2010
Portugal3300 Posts
April 14 2014 13:04 GMT
#9339
On April 14 2014 06:03 Ame wrote:
Show nested quote +
On April 14 2014 04:29 Millitron wrote:
I'm not familiar with the Sieve of Eratosthenes, but is it possible that at around 350m primeSieve is over 2 billion? If primeSieve rolls over, you're screwed and stuck in the second for loop forever.

As for the weird printing, I think that's an artifact of system.out.print. Printing to the screen is horribly slow compared to doing math.


Whoops, some clarity: by 350m primeSieve, I meant the integer is ~350,000,000, so not worried about overflow yet, at least I don't think. And yea, I've run into the system.out.print being slow a bit back when I noticed run time went from minutes to seconds or something ridic by cutting out printing during steps the first time I tried to throw together a prime generator. :p

Still ran for over 5 minutes of nothing before I cut out without the print statements, so I don't think it was printing alone. I mainly threw in printing to make sure the ranges were still in values expected for the loop (checking for overflow) and to see where performance started taking a hit (the 350m figure).

Show nested quote +
On April 14 2014 05:34 Cyx. wrote:
So wild guess - I might be really wrong - but on an old system with 2GB of RAM the max you'd be able to fit in RAM even with nothing else happening at all would be like 500 million ints or so, meaning that other things could reasonably eat up a couple hundred million of those spaces, leaving you with room for 300 million ints in memory before you started requiring a LOT of disk accesses, which would totally destroy your performance.


I had a vague notion that it might have been a reason like this, but before now haven't read too much into RAM vs disk access/etc.. With your guess I will be doing so now.

+ Show Spoiler [Ramblings] +

Other details for fun: laptop system claims 4GB, but no idea how much of that Java can probably access. Having to use <Integer> in ArrayList instead of being able to use int probably adds decent bit of memory overhead, and other inefficiencies I have sound enough to push things out of RAM into disk anyways. Without some trickery (reading up on partitioned sieves and stuff), looks like I'm actually approaching the limit of how many primes I can generate gg.

Original problem was actually just to check if a list of arbitrary large numbers were prime, so turns out using BigInteger.probablePrime() ending up being a way faster solution (well not really arbitrary and there's probably some really fancy mathematical way to do it, but math). Now just to code my own version of Miller Rabin, hue.



I made a sieve with some optimizations, source at https://github.com/Misirlou/CparParallelSieve/blob/master/single.c
There are 3 different functions, named 1,2 and 3 . The first function is terribly slow for anything greater than n=2^27, that is computing all primes lower than 2^27. I can get the other ones to run till 2^33 under a minute. The 3rd function takes an extra argument that defines a block size. This is used to split the sieve into little pieces so the array gets stored in cache instead of RAM, which is a much faster memory, as the results I collected can prove, on google spreadsheet
I also stored the primes not as an int array but in a char array. Every bit of a char represents a number, so one char can hold 8 "numbers". If it's unmarked when the computation is finished, it means that number is a prime. I also don't have a position for even numbers, I skip them entirely because the only even number that is prime is 2. All of this was done in an effort to use the least amount of memory. The code gets a little more tricky and it takes more operations to access an element but these operations are meaningless compared to what I save in memory access.

On your code shouldn't marked and sieve be the same array?




aksfjh
Profile Joined November 2010
United States4853 Posts
April 14 2014 17:28 GMT
#9340
I created a heartbleed detection script for Perl. Figured I would share it with you guys and answer any questions or comments about the vulnerability or Perl.

http://www.github.com/aksfjh/heartbleed
Prev 1 465 466 467 468 469 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 7h 46m
[ Submit Event ]
Live Streams
Refresh
StarCraft: Brood War
Britney 44440
Calm 5726
Bisu 3106
Horang2 777
Mini 743
Light 604
Soma 507
EffOrt 458
ggaemo 416
actioN 297
[ Show more ]
ZerO 214
Snow 163
hero 105
Sharp 99
PianO 94
Hyun 78
Dewaltoss 78
Killer 75
Zeus 65
Leta 59
Mind 58
Pusan 54
Aegong 40
ToSsGirL 34
Shinee 26
Hm[arnc] 24
sorry 23
Backho 23
Rock 20
Terrorterran 19
Movie 19
Bale 17
sSak 16
IntoTheRainbow 16
Sacsri 9
ajuk12(nOOB) 8
zelot 7
Dota 2
Gorgc4487
qojqva726
syndereN419
Counter-Strike
fl0m1649
zeus793
byalli523
edward83
pashabiceps29
Other Games
singsing2064
B2W.Neo1363
hiko969
Liquid`RaSZi855
Beastyqt823
FrodaN808
Hui .203
ArmadaUGS169
KnowMe155
QueenE104
monkeys_forever95
Mew2King83
Livibee60
Trikslyr46
ZerO(Twitch)18
DeMusliM9
Organizations
Dota 2
PGL Dota 2 - Main Stream48
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 14 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 37
• Azhi_Dahaki1
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• WagamamaTV408
• Shiphtur232
Upcoming Events
PiGosaur Cup
7h 46m
GSL
17h 16m
Classic vs Cure
Maru vs Rogue
GSL
1d 17h
SHIN vs Zoun
ByuN vs herO
OSC
1d 18h
OSC
1d 20h
Replay Cast
2 days
Escore
2 days
The PondCast
2 days
WardiTV Invitational
2 days
Zoun vs Ryung
Lambo vs ShoWTimE
OSC
3 days
[ Show More ]
Replay Cast
3 days
CranKy Ducklings
3 days
RSL Revival
3 days
SHIN vs Bunny
ByuN vs Shameless
WardiTV Invitational
3 days
Krystianer vs TriGGeR
Cure vs Rogue
uThermal 2v2 Circuit
3 days
BSL
4 days
Replay Cast
4 days
Sparkling Tuna Cup
4 days
RSL Revival
4 days
Cure vs Zoun
Clem vs Lambo
WardiTV Invitational
4 days
BSL
5 days
GSL
5 days
Afreeca Starleague
5 days
Monday Night Weeklies
5 days
Afreeca Starleague
6 days
CranKy Ducklings
6 days
Liquipedia Results

Completed

Proleague 2026-05-02
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

YSL S3
Escore Tournament S2: W6
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
Escore Tournament S2: W7
Escore Tournament S2: W8
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 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.