• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 12:58
CET 18:58
KST 02:58
  • 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
RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners11Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation10Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
RSL Season 3 - RO16 Groups A & B Preview Mech is the composition that needs teleportation t [TLMC] Fall/Winter 2025 Ladder Map Rotation Weekly Cups (Nov 3-9): Clem Conquers in Canada Craziest Micro Moments Of All Time?
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament RSL Revival: Season 3 Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
BW General Discussion FlaSh on: Biggest Problem With SnOw's Playstyle What happened to TvZ on Retro? Brood War web app to calculate unit interactions [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
Current Meta Simple Questions, Simple Answers PvZ map balance How to stay on top of macro?
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Clair Obscur - Expedition 33 Beyond All Reason Should offensive tower rushing be viable in RTS games?
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1583 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
Hyrule19152 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
Next event in 16h 2m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 291
BRAT_OK 86
JuggernautJason36
MindelVK 16
StarCraft: Brood War
Britney 37933
Rain 3655
Calm 3299
Horang2 1666
Hyuk 704
actioN 540
Soma 420
PianO 290
firebathero 230
hero 188
[ Show more ]
Rush 154
Barracks 69
Dewaltoss 63
White-Ra 57
TY 53
Free 29
Terrorterran 17
Movie 15
Shine 14
Bale 10
Dota 2
qojqva2819
Dendi1278
Counter-Strike
kRYSTAL_37
Super Smash Bros
Mew2King73
Other Games
B2W.Neo814
Beastyqt690
Lowko341
Fuzer 160
Liquid`VortiX151
QueenE79
Trikslyr49
EmSc Tv 10
febbydoto8
Organizations
Other Games
EmSc Tv 10
StarCraft 2
EmSc2Tv 10
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 21 non-featured ]
StarCraft 2
• StrangeGG 53
• poizon28 23
• AfreecaTV YouTube
• sooper7s
• intothetv
• Migwel
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• HerbMon 24
• Michael_bg 5
• FirePhoenix5
• blackmanpl 1
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 3549
• WagamamaTV311
League of Legends
• Nemesis2933
• TFBlade806
Other Games
• Shiphtur241
Upcoming Events
CranKy Ducklings
16h 2m
RSL Revival
16h 2m
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
18h 2m
Cure vs Reynor
Classic vs herO
IPSL
23h 2m
ZZZero vs rasowy
Napoleon vs KameZerg
OSC
1d 1h
BSL 21
1d 2h
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
1d 16h
RSL Revival
1d 16h
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
1d 18h
WardiTV Korean Royale
1d 18h
[ Show More ]
BSL 21
2 days
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
2 days
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
2 days
Wardi Open
2 days
Monday Night Weeklies
2 days
WardiTV Korean Royale
3 days
BSL: GosuLeague
4 days
The PondCast
4 days
Replay Cast
5 days
RSL Revival
5 days
BSL: GosuLeague
6 days
RSL Revival
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

Proleague 2025-11-07
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
RSL Revival: Season 3
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
META Madness #9
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.