• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 17:52
CEST 23:52
KST 06:52
  • 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] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists16[ASL21] Ro16 Preview Pt1: Fresh Flow9[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0
Community News
2026 GSL Season 1 Qualifiers19Maestros of the Game 2 announced92026 GSL Tour plans announced15Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid25
StarCraft 2
General
MaNa leaves Team Liquid Maestros of the Game 2 announced 2026 GSL Tour plans announced Team Liquid Map Contest #22 - The Finalists Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool
Tourneys
2026 GSL Season 1 Qualifiers INu's Battles#14 <BO.9 2Matches> Sparkling Tuna Cup - Weekly Open Tournament GSL CK: More events planned pending crowdfunding RSL Revival: Season 5 - Qualifiers and Main Event
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 522 Flip My Base The PondCast: SC2 News & Results Mutation # 521 Memorable Boss Mutation # 520 Moving Fees
Brood War
General
Leta's ASL S21 Ro.16 review BW General Discussion ASL21 General Discussion BGH Auto Balance -> http://bghmmr.eu/ Data needed
Tourneys
[Megathread] Daily Proleagues Escore Tournament StarCraft Season 2 [ASL21] Ro16 Group C [ASL21] Ro16 Group D
Strategy
Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend? Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Dawn of War IV Diablo IV Total Annihilation Server - TAForever Starcraft Tabletop Miniature Game
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 Canadian Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story Cricket [SPORT]
World Cup 2022
Tech Support
Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2043 users

The Big Programming Thread - Page 83

Forum Index > General Forum
Post a Reply
Prev 1 81 82 83 84 85 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.
RoyGBiv_13
Profile Blog Joined August 2010
United States1275 Posts
October 03 2011 20:32 GMT
#1641
The top left corner is packages (ignore those). The frame on the left side is a listing of all java standard library classes. Ctrl-f System and click on it. In the main window, the System class will pop up. Hope i helped.
Any sufficiently advanced technology is indistinguishable from magic
nath
Profile Blog Joined May 2010
United States1788 Posts
October 03 2011 20:38 GMT
#1642
On October 04 2011 05:12 Thorakh wrote:
Show nested quote +
95% of all programmers couldn't write maintainable code if their life depended on it
I always hear people talking about this, but what do you exactly mean by that? Can you give any examples?

they solve the problem given to them, not accounting for the fact that new problems or requirements surface in the future, providing programmers with endless amounts of work to update/tweak things.

fundamental programming principles is what is lacking in 95%; scalability and long-term coding practices rather than quick fixes and script-kiddie-esque solutions.

i agree with Mordiford; programmers are born. been coding since i was 7 (dad is a crazy physics guy and taught me BASIC at that age). been in the IT industry without a degree and doing well, including running my own business I am definitely far better skillwise and posess more value to a company than my peers who have cs degrees and lack of passion in the field.
Founder of Flow Enterprises, LLC http://flow-enterprises.com/
EvanED
Profile Joined October 2009
United States111 Posts
Last Edited: 2011-10-03 20:59:56
October 03 2011 20:56 GMT
#1643
On October 04 2011 02:36 heishe wrote:
Show nested quote +
On October 03 2011 02:36 HowitZer wrote:
On October 02 2011 20:56 heishe wrote:
By the way, academic programming courses are usually pretty bad. The problem is that programming doesn't ever have general cases of problems which can be solved with general methods, ...


I'm content with the programming classes I took in college insofar as they prepared me for the real programming based job I have now. I think I've applied 75% of what I did in my programming classes to real world problems. It was never a problem in college to find a generic problem to apply some programming method to.



You kinda cut off the point of my statement. I know that you learn some things there that you'll need later, but I think nothing that you learn in one of those courses can't be picked up a lot quicker by reading a tutorial or a good book.

Or can you provide a counter example?

I don't think that is much more true of programming than any other topic. If anything, the fact that it's not as well-developed (and "general cases of problems which can be solved with general methods" if you believe that -- I only sort of buy it) means that the ability to ask questions and such is more important than it is in many other topics. And tutorials and books don't answer questions.

(To disclaim my bias, I'm sort of aiming to be a CS prof in a couple years.)
mmp
Profile Blog Joined April 2009
United States2130 Posts
Last Edited: 2011-10-03 21:21:14
October 03 2011 21:01 GMT
#1644
On October 04 2011 05:22 vyyye wrote:
Slightly retarded question, but how do you navigate the Java API? I opened it a bunch of times, I'm met with a box with links and some stuff on the sidebar, but I have no idea how or where I should look for anything. Tried clicking about but not getting wiser.

I'm really new to programming as a whole, maybe that's why? Used a For Dummies book a bit which kept advising to look X up in the API and eh, not quite working out.

We can certainly help point you in the right direction, but maybe you should explain what it is you're trying to do?

If you're talking about the standard API, then yeah there's a lot there but it should be manageable once you've articulated what task you're trying to achieve.

e.g. I want open a network socket and talk with a server... so I go into the java.net package (sounds like the right one) and WOW everything I could need is right there. So I click on class Socket, and I get a huge list of members and other information. Questions that come to mind are: (1) Am I in the right place? (2) Is this the right class? (3) How do I use this class?

(1) The description at the top tells me that it's probably what I'm looking for.
(2) I can also see that it extends Object (if it had any siblings worth considering, I would probably see an abstract base class that it inherits from). It implements Closable, which doesn't appear to be very interesting, and it has one documented subclass SSLSocket -- which does what its name says. So I've probably got the right class unless I want to use SSL.
(3) Ok, the only way I can use this class is to instantiate it with one of its many constructors. *read read read* Ok, I see some redundancy in the constructors, but I think I'm going to need to specify a port and address if nothing else. The rest is checking out what the methods do, and how to read/write.

Welcome to JavaDocs. It's not very friendly at first, but in time you'll find it is both clean and organized. It's obviously nowhere near as user-friendly as, say, the Python docs (which are generally more elaborate and include generous amounts of example code), but it's usually simpler to navigate and more thorough than hand-written docs (which often forget to mention important details).
I (λ (foo) (and (<3 foo) ( T_T foo) (RAGE foo) )) Starcraft
vyyye
Profile Joined July 2010
Sweden3917 Posts
Last Edited: 2011-10-03 21:34:27
October 03 2011 21:33 GMT
#1645
On October 04 2011 06:01 mmp wrote:
Show nested quote +
On October 04 2011 05:22 vyyye wrote:
Slightly retarded question, but how do you navigate the Java API? I opened it a bunch of times, I'm met with a box with links and some stuff on the sidebar, but I have no idea how or where I should look for anything. Tried clicking about but not getting wiser.

I'm really new to programming as a whole, maybe that's why? Used a For Dummies book a bit which kept advising to look X up in the API and eh, not quite working out.

We can certainly help point you in the right direction, but maybe you should explain what it is you're trying to do?

If you're talking about the standard API, then yeah there's a lot there but it should be manageable once you've articulated what task you're trying to achieve.

e.g. I want open a network socket and talk with a server... so I go into the java.net package (sounds like the right one) and WOW everything I could need is right there. So I click on class Socket, and I get a huge list of members and other information. Questions that come to mind are: (1) Am I in the right place? (2) Is this the right class? (3) How do I use this class?

(1) The description at the top tells me that it's probably what I'm looking for.
(2) I can also see that it extends Object (if it had any siblings worth considering, I would probably see an abstract base class that it inherits from). It implements Closable, which doesn't appear to be very interesting, and it has one documented subclass SSLSocket -- which does what its name says. So I've probably got the right class unless I want to use SSL.
(3) Ok, the only way I can use this class is to instantiate it with one of its many constructors. *read read read* Ok, I see some redundancy in the constructors, but I think I'm going to need to specify a port and address if nothing else. The rest is checking out what the methods do, and how to read/write.

Welcome to JavaDocs. It's not very friendly at first, but in time you'll find it is both clean and organized. It's obviously nowhere near as user-friendly as, say, the Python docs (which are generally more elaborate and include generous amounts of example code), but it's usually simpler to navigate and more thorough than hand-written docs (which often forget to mention important details).

Ah, thanks a ton! It seems I haven't even looked in the right place, let alone found it. I have been looking at the Documentation page thinking that was what the book/folks were referring to, oh well. The actual API isn't at all the nightmare I thought it was, damn that makes life easier.
I do wonder how retarded this will seem in a few months looking back in hindsight, ahh.
Millitron
Profile Blog Joined August 2010
United States2611 Posts
October 04 2011 00:24 GMT
#1646
On October 04 2011 05:12 Thorakh wrote:
Show nested quote +
95% of all programmers couldn't write maintainable code if their life depended on it
I always hear people talking about this, but what do you exactly mean by that? Can you give any examples?

Most people are bad about commenting there work, and even when they do, the comments aren't very explanatory. Further, maintainable code needs commonly used variables defined globally, rather than each time its needed, so you can update it in only one spot and be done with it. Last, variables should be well-named. Unless it's some loop-control variable you'll never use again, you should never name things with a single character. Always use more descriptive names.
Who called in the fleet?
haduken
Profile Blog Joined April 2003
Australia8267 Posts
October 04 2011 00:56 GMT
#1647
On October 04 2011 09:24 Millitron wrote:
Show nested quote +
On October 04 2011 05:12 Thorakh wrote:
95% of all programmers couldn't write maintainable code if their life depended on it
I always hear people talking about this, but what do you exactly mean by that? Can you give any examples?

Most people are bad about commenting there work, and even when they do, the comments aren't very explanatory. Further, maintainable code needs commonly used variables defined globally, rather than each time its needed, so you can update it in only one spot and be done with it. Last, variables should be well-named. Unless it's some loop-control variable you'll never use again, you should never name things with a single character. Always use more descriptive names.


The best code is the one that speaks for itself either via convention or a well known architectural design this way even without comments a new coder can immediately recognize the program flow and do work on it however as we all know this is difficult to achieve especially with the resource and time constraints that most projects have.
Rillanon.au
Nanar
Profile Joined July 2011
United States16 Posts
October 04 2011 03:54 GMT
#1648
To clarify: anyone have any good documents/instructions on learning the assembly programming, we use the Motorola 68HC11.
alwinuz
Profile Joined September 2011
Netherlands77 Posts
October 04 2011 04:34 GMT
#1649
On October 03 2011 23:26 EvanED wrote:
Show nested quote +
On October 03 2011 13:38 alwinuz wrote:
On October 03 2011 04:43 EvanED wrote:
The "abstract" part of "abstract queue" comes more from the fact that it doesn't specify how the implementation works, and isn't particularly related to the fact that the collection is parameterized. In other words, it's abstract because you don't know if it's implemented with an array, a linked list, or some other data structure. (That's not the whole story and it'd be possible to write a bit more about that -- in particular it doesn't say why it should be distinct from the Queue interface -- but that's the main bit.) In particular, the generics parameterization is basically unrelated.

And if it makes you think abstract class, that's good... because it is one, and that's also related to the name. :-)


Why an abstract class and not an interface?

They provide a partial implementation.

It might be easier to understand that by looking at AbstractCollection.If you have some new idea for a collection, you can extend AbstractCollection instead of implementing Collection and do way less work.

For full functionality, the only functions you need to write are add(E obj), iterator(), and size(). That's three functions instead of the 15 of the Collection interface.

The AbstractCollection will do things like provide contains(Object o) by calling iterator() and walking over the collection for you. You are, of course, free to override more of those methods if you have a better implementation.


Yeah I see, I got puzzeled by the remark "doesn't specify how the implementation works". In my mind "implementation is up to you" --> interface. Of course an abstract base class is useful for writing your own collection.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
October 04 2011 08:19 GMT
#1650
On October 04 2011 05:12 Thorakh wrote:
Show nested quote +
95% of all programmers couldn't write maintainable code if their life depended on it
I always hear people talking about this, but what do you exactly mean by that? Can you give any examples?


Ok, as example of code that studied programmers created in this company.
Some of the stuff is replaced/fixed, other parts are still active:
(Bolded text added by me)

+ Show Spoiler [Version Control] +

-rw-r--r-- 1 www www 27947 Jan 3 2007 28May03.mov_func.inc.phtml
-rw-r--r-- 1 www www 98923 Sep 21 2010 mov_func.inc.phtml
-rw-r--r-- 1 www www 47372 Jan 3 2007 mov_func.inc.phtml~
-rw-r--r-- 1 www www 98861 Sep 21 2010 mov_func.inc.phtml.20100921
-rw-r--r-- 1 www www 84133 Aug 23 2007 mov_func.inc.phtml.BAK
-rw-r--r-- 1 www www 88870 Oct 9 2007 mov_func.inc.phtml.desaster ???
-rw-r--r-- 1 www www 88766 Aug 24 2007 mov_func.inc.phtml.NEW
-rw-r--r-- 1 www www 73230 Jun 5 2007 mov_func.inc.phtml.ol10
-rw-r--r-- 1 www www 47374 Jan 3 2007 mov_func.inc.phtml.ol3
-rw-r--r-- 1 www www 97245 Dec 10 2009 mov_func.inc.phtml.ol5
-rw-r--r-- 1 www www 48334 Jan 3 2007 mov_func.inc.phtml.ol6
-rw-r--r-- 1 www www 48665 Jan 3 2007 mov_func.inc.phtml.ol7
-rw-r--r-- 1 www www 57774 Jan 4 2007 mov_func.inc.phtml.ol8
-rw-r--r-- 1 www www 59815 Apr 24 2007 mov_func.inc.phtml.ol9
-rw-r--r-- 1 www www 49476 Jan 3 2007 mov_func.inc.phtml.old
-rw-r--r-- 1 www www 45118 Jan 3 2007 mov_func.inc.phtml.old2
-rw-r--r-- 1 www www 88870 Nov 27 2007 mov_func.inc.phtml.on
-rw-r--r-- 1 www www 80994 Aug 14 2007 mov_func.inc.phtml.on.php
-rw-r--r-- 1 www www 84775 Aug 23 2007 mov_func.inc.phtml.tmp
-rw-r--r-- 1 www www 86113 Aug 23 2007 mov_func.inc.phtml.tmp2


+ Show Spoiler [Global Variables] +

function include_skin($skinfile)
{
global $template, $scn, $sea, $lng, $sub, $VC_SESSION_C, $off, $aff;
global $allowedxyzewrlhjth3w45z; // Achtung NICHT löschen oder modifizieren English: Attention. DON'T delete or modify
global $stm, $PHP_SELF, $mov, $sfm, $psb, $act, $key, $lang, $fn, $fe, $rn, $re;
global $REMOTE_ADDR, $HTTP_USER_AGENT, $niz, $mid, $cards_key, $fra, $spe;
...
}
This was NOT an exception but the standard (also: register_globals on). At least most other functions were a little more sane... though not by much
function cards_pay()
{
global $mid, $fe, $fn, $rn, $re, $scn, $key, $niz, $stm, $REMOTE_ADDR, $HTTP_USER_AGENT;
...
}


+ Show Spoiler [Simple SQL Queries] +

This is one of the shorter ones, luckily just from the cron which runs only once per day but takes 45-60 minutes. I wrote a replacement prototype with a new DB layout that took 5 minutes, though due to time constraints i can't switch the page to the new Database.

The queries from the page itself don't look a lot better though.


INSERT INTO movieon4.tmp_movie_detail
SELECT m.movie_id,
t3.producer_id,
t3.producer,
m.director,
m.produced_year,
m.barcode,
GROUP_CONCAT(DISTINCT
IF(p.propertytype_id = 14,p.property_id,NULL),'|',p.property_text_id,'|',IFNULL(tct.main_category_id,0),'|',IFNULL(p2.property_text_id,0)
SEPARATOR ',')
AS movie_category,
ROUND((IFNULL(CAST(GROUP_CONCAT(DISTINCT CASE p.property_id
WHEN 43 THEN 1
WHEN 44 THEN 2
WHEN 45 THEN 3
WHEN 46 THEN 4
WHEN 47 THEN 5
END SEPARATOR '') AS decimal),4))) AS sterne,
GROUP_CONCAT(DISTINCT IF(p.propertytype_id = 24,p.property_text_id,NULL)) AS sprache,
GROUP_CONCAT(DISTINCT p.property_id SEPARATOR ',') REGEXP '^74,|,74,',
GROUP_CONCAT(DISTINCT a.actor_id,'|',a.actor SEPARATOR ','),
GROUP_CONCAT(DISTINCT IF(p.propertytype_id = 34,p.property_id,NULL)),
GROUP_CONCAT(DISTINCT IF(p.propertytype_id = 34,p.property_text_id,NULL)),
IFNULL(vs.sum,0),
m.aspect_ratio
FROM (SELECT DISTINCT movie_id FROM movieon4.tmp_movie WHERE type = 0) tm
LEFT JOIN moviedb.movie m ON m.movie_id = tm.movie_id
LEFT JOIN moviedb.producer t3 ON t3.producer_id = m.producer_id AND t3.deleted = 0 AND t3.product_id != 5
LEFT JOIN moviedb.movieproperty mpp ON tm.movie_id = mpp.movie_id AND mpp.property_id IN (SELECT DISTINCT property_id FROM moviedb.productproperty WHERE product_id IN ( 1, 6, 8, 9, 16, 17, 18, 19, 22 ))
LEFT JOIN moviedb.property p ON p.property_id = mpp.property_id AND p.deleted = 0
LEFT JOIN movieon4.tmp_vote_statistic vs ON tm.movie_id = vs.movie_id
LEFT JOIN movieon4.tmp_category_tree tct ON tct.category_id = p.property_id
LEFT JOIN moviedb.property p2 ON p2.property_id = tct.main_category_id AND p2.deleted = 0
LEFT JOIN moviedb.actormovie am ON am.movie_id = tm.movie_id
LEFT JOIN moviedb.actor a ON a.actor_id = am.actor_id AND a.deleted = 0
WHERE 1
AND p.propertytype_id in( 14,17,22,23,24,34)
GROUP BY m.movie_id


+ Show Spoiler [Common If Pattern] +

if ($something) {
// Nothing here
} else {
// Do stuff
}


Also:
- 30'000 lines of code in one of the sub projects without a single function
- The same SQL Query repeated 13 times in a single 1000 line code file (though in one instance the table aliases t1 and t2 were switched around)
- Database columns with a comma seperated list of pipe seperated values... The only way to search in this field are regex... and it's a common search field, so all queries are horribly slow.
- All functions are in a single file called "funcs.php". At least we go rid of "somethings.php" in most of the projects (no joke).
- Table and column names sometimes english, sometimes german, sometimes misspelled even in a single table/database. ID columns sometimes "id", "xyz_id" or just "xyz", even for the same ID in different tables.

In the time here i tried to start several initiatives to improve the code quality:
- Started a company library of programming books (work related and not work related) and bought a lot of books from my own money for everyone else to read because they company didn't want to spend money on training. I wanted to give the other programmers a chance to train themselves. Every other programmer said "Hey, cool idea"... Only 2 of them have actually read some the books.

- Code Reviews - cancelled, the others didn't find it useful.

- Seperated Testing department - cancelled, the company hired a student that just clicked through the frontend and never found any errors.

- Unit Testing - not implemented, "takes too much time"

Anyone wondering why i'm quitting?

PS: Anyone looking for a programmer that is burnt out from having to deal with horrible programmers?
renox
Profile Joined June 2011
United States48 Posts
October 04 2011 21:43 GMT
#1651
Hey guys,

I'm currently a first year computer science student and I am in need of a job. What would you guys suggest I look for to benefit me in this field? Is there anything that I would even qualify for just being a first year student? Any and all advice would be lovely, share personal experiences of working during school etc.
tofucake
Profile Blog Joined October 2009
Hyrule19205 Posts
October 04 2011 22:18 GMT
#1652
Almost any work you'll get as a first year student will be bitch work and there's no way around it.

Is this going to be a job you do for school (co-op program) or just something you'll do in your spare time?
Liquipediaasante sana squash banana
Deadeight
Profile Blog Joined September 2010
United Kingdom1629 Posts
October 04 2011 22:28 GMT
#1653
I do physics and maths at uni, and I'm currently doing a python module in which the aim is to model high energy particle collisions. The basics are really dull, but it gets pretty interesting, and I've ended up downloading python at home and using the skype module and stuff.

How does python compare to other languages? Is it relevant/commonly used? Is it similar? It's actually quite fun.
renox
Profile Joined June 2011
United States48 Posts
October 04 2011 23:05 GMT
#1654
On October 05 2011 07:18 tofucake wrote:
Almost any work you'll get as a first year student will be bitch work and there's no way around it.

Is this going to be a job you do for school (co-op program) or just something you'll do in your spare time?

Well I need a job just to have money and for my expenses, but I was wondering if there was something I could do that would later be useful to me in some way in regards to this field. So I was wondering if you guys have had some luck like this or experience with it. I mean I could get some random job like most college students but I figured if I could tie it into the field I want to study somehow it would benefit me because I may find it interesting but also be an asset to my career down the road.
WickedSkies
Profile Blog Joined August 2011
Netherlands81 Posts
Last Edited: 2011-10-04 23:45:42
October 04 2011 23:43 GMT
#1655
On October 05 2011 07:28 Deadeight wrote:
I do physics and maths at uni, and I'm currently doing a python module in which the aim is to model high energy particle collisions. The basics are really dull, but it gets pretty interesting, and I've ended up downloading python at home and using the skype module and stuff.

How does python compare to other languages? Is it relevant/commonly used? Is it similar? It's actually quite fun.

Despite the fact that I am a hardcore Java programmer, I am somewhat also familiar with Python, so here it goes

Well, Python is a somewhat unique language in the sense it uses indentation not only for readability. As far as I know, there is no other similar programming language in that regard, but I might be wrong. Usually I use Python for scripting, but as I am a simpleton and I suck at Python (the syntax, man, the syntax), I prefer bash/Perl for scripting tasks. Don't be fooled by my above statement, though, Python is by no extent merely a scripting language, although in my encounters with it I have used it as such I hear it is a pretty decent programming language and you can do a lot of stuff with it. As with almost every Interpreted language (that is a no-compiler language), you don't have to wait much in development, it's just a matter of saving the file and running it. I am not familiar with the algorithms of garbage collection or reference counting as I am familiar with the garbage collectors in Java, but I assume there are books for that. Also, Python code seems to be shorter in length (but wider, unfortunately) than its equivalent in bash or Perl.

For me, Python is actually the least readable programming language I have ever encountered in my life (at least it's not much lines), but my colleagues find it easy to read, so let's just say I am biased in that regard. There are interpreters for almost every architecture you can come up with, so it is pretty much available anywhere. On the job market, I have not seen much vacancies for Python programmers, as it is not very popular as a main programming language nowadays, but there are some indeed, and also it is a big plus to have on your resume together with some other like c,c++, Java, C# or some other stuff. Hope my ramblings have been helpful or a tad informative to you.
Drone chasing probe, Tasteless quietly watching (Artosis)
EvanED
Profile Joined October 2009
United States111 Posts
Last Edited: 2011-10-05 01:07:38
October 05 2011 01:07 GMT
#1656
On October 05 2011 08:43 WickedSkies wrote:
Show nested quote +
On October 05 2011 07:28 Deadeight wrote:
I do physics and maths at uni, and I'm currently doing a python module in which the aim is to model high energy particle collisions. The basics are really dull, but it gets pretty interesting, and I've ended up downloading python at home and using the skype module and stuff.

How does python compare to other languages? Is it relevant/commonly used? Is it similar? It's actually quite fun.

Despite the fact that I am a hardcore Java programmer, I am somewhat also familiar with Python, so here it goes

Well, Python is a somewhat unique language in the sense it uses indentation not only for readability. As far as I know, there is no other similar programming language in that regard, but I might be wrong.

Haskell almost does. (It has optional braces, but they seem to be rarely used, and the indentation guides what basically amounts to automatic brace placement in places you don't use them explicitly.)

Usually I use Python for scripting, but as I am a simpleton and I suck at Python (the syntax, man, the syntax), I prefer bash/Perl for scripting tasks.

There's no accounting for taste I guess. :-)

I am not familiar with the algorithms of garbage collection or reference counting as I am familiar with the garbage collectors in Java

They're... lacking. The evidence I've seen suggests that good generational garbage collectors (e.g. what's in the JVM) should perform better than reference counting (especially reference counting with occasional walks of the object graph to deal with cycles), albeit at the cost of a rather larger memory use.

For me, Python is actually the least readable programming language I have ever encountered in my life (at least it's not much lines), but my colleagues find it easy to read, so let's just say I am biased in that regard.

I'm sure this is almost entirely familiarity. I would put it far above Bash for instance, and above Perl.

On the job market, I have not seen much vacancies for Python programmers, as it is not very popular as a main programming language nowadays, but there are some indeed, and also it is a big plus to have on your resume together with some other like c,c++, Java, C# or some other stuff.

On the other hand, while there may not be all that many "Python" jobs out there, there are a ton of jobs where you are likely to use Python. For lots of companies, even if their primary dev language is C++ or Java or whatever, they'll have a bunch of Python scripts hanging around to do various tasks. Work as glue between components, have as a build system (SCons for instance is gaining traction, and SCons build scripts are written in Python; there's also the lesser-known Waf), a configuration language (Buildbot), etc. So if you were to apply to such a company, having some Python knowledge could very easily be a definite plus.

Google also does a crapload of programming in Python.
Beatrenger
Profile Joined November 2010
Mexico22 Posts
October 06 2011 00:58 GMT
#1657
OK.. so i downloaded Netbeans and it works fine and all but i have a HUGE problem with the loop FOR thingy... I don't want to type the code here but everything seems to be fine cause its not sending me any error but net-beans is not reading at all the for cycle it goes straight to the end and prints the initial number i set for some variable in the beginning. can i pm the code to someone or something the code is rather short like 5 lines its for adding numbers...
I like warcraft... er* starcraft!*
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
October 06 2011 08:49 GMT
#1658
On October 06 2011 09:58 Beatrenger wrote:
OK.. so i downloaded Netbeans and it works fine and all but i have a HUGE problem with the loop FOR thingy... I don't want to type the code here but everything seems to be fine cause its not sending me any error but net-beans is not reading at all the for cycle it goes straight to the end and prints the initial number i set for some variable in the beginning. can i pm the code to someone or something the code is rather short like 5 lines its for adding numbers...


Why not just post it here if it's short?
Or if it's longer, just put it into spoiler tags.
MisterD
Profile Blog Joined June 2010
Germany1338 Posts
October 06 2011 09:00 GMT
#1659
or use pastebin, which adds syntax highlighting.
Gold isn't everything in life... you need wood, too!
Frigo
Profile Joined August 2009
Hungary1023 Posts
Last Edited: 2011-10-09 16:45:26
October 09 2011 16:45 GMT
#1660
Any idea whether java.util.Observable uses a list or a set to store Observers? The reference manual does not mention Comparable, only equals so it suggests a list but I'm not sure.

I want it to use in a graph library. Graph is Observable, NodeVector and EdgeVector are vectors indexed by the id of Node and Edge objects, and they automatically grow when new nodes or edges are added to the graph. At the moment I am using a custom Observable and Observer class, but it would be much tidier if I used the standard classes. However if they increase the runtime from O(n log n) to O(n^2) it is out of the question.

A demonstration of the current version:
DirectedGraph G = new DirectedSetGraph();

NodeVector<Integer> nodev = new NodeVector<Integer>(G);
EdgeVector<Integer> edgev = new EdgeVector<Integer>(G);

Node u = G.addNode();
Node v = G.addNode();
Edge e = G.addEdge(u, v);
nodev.set(u, 1);
nodev.set(v, 10);
edgev.set(e, 2);

for( Node node : G.getNodes() ){
System.out.println(nodev.get(node));
}

for( Edge edge : G.getEdges() ){
System.out.println(edgev.get(edge));
}

http://www.fimfiction.net/user/Treasure_Chest
Prev 1 81 82 83 84 85 1032 Next
Please log in or register to reply.
Live Events Refresh
BSL
19:00
RO16 TieBreaker - Group A
ZZZero.O263
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 187
ProTech130
CosmosSc2 80
Ketroc 54
StarCraft: Brood War
ZZZero.O 263
ggaemo 111
Dota 2
monkeys_forever735
League of Legends
Doublelift3896
Counter-Strike
Pyrionflax198
minikerr20
Super Smash Bros
C9.Mang0445
AZ_Axe218
Heroes of the Storm
Khaldor508
Liquid`Hasu473
Other Games
gofns10637
summit1g9060
tarik_tv6827
Grubby4479
FrodaN1420
KnowMe156
ViBE39
Organizations
Other Games
gamesdonequick1533
StarCraft 2
angryscii 41
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 19 non-featured ]
StarCraft 2
• Hupsaiya 65
• musti20045 44
• poizon28 30
• davetesta13
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• FirePhoenix8
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Other Games
• imaqtpie1353
• Scarra736
• Shiphtur270
• tFFMrPink 16
Upcoming Events
Sparkling Tuna Cup
12h 8m
WardiTV Map Contest Tou…
13h 8m
Ladder Legends
17h 8m
BSL
21h 8m
CranKy Ducklings
1d 2h
Replay Cast
1d 11h
Wardi Open
1d 12h
Afreeca Starleague
1d 12h
Soma vs hero
Monday Night Weeklies
1d 18h
Replay Cast
2 days
[ Show More ]
Replay Cast
2 days
Afreeca Starleague
2 days
Leta vs YSC
Replay Cast
4 days
The PondCast
4 days
KCM Race Survival
4 days
Replay Cast
5 days
Replay Cast
5 days
Escore
5 days
Replay Cast
6 days
Replay Cast
6 days
IPSL
6 days
Ret vs Art_Of_Turtle
Radley vs TBD
BSL
6 days
Liquipedia Results

Completed

Escore Tournament S2: W4
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
StarCraft2 Community Team League 2026 Spring
WardiTV TLMC #16
Nations Cup 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

Escore Tournament S2: W5
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
RSL Revival: Season 5
2026 GSL S1
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
BLAST Rivals Spring 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.