• 1

    posted a message on I need a new hobby
    Quote from Lt. Venom

    I would like to learn Java and/or JavaScript. Where did you get tutorials and such for learning Java; JavaScript?

    Also what the hell is the difference between Java and JavaScript?

    My biased opinion: Java is for corporate masochists and JavaScript is a waste of time, unless you learn it to supplement an already vast knowledge of some server-side language (PHP, Ruby, Python, etc)

    The actual facts: JavaScript and Java have absolutely /nothing/ to do with eachother. They share the "java" part in the name and that is were all similarities and (apart from both being ECMA standard languages, which refers to the syntax of the language)

    JavaScript is used solely for "programming" in the browser. With HTML5 it can do more fun and versatile stuff, but it's still a scripting language, like PHP and Python. Meaning it's not compiled like C#, C or Java and it's therefor "slow" - in comparison.

    The key point here is that JS ONLY works in a browser. So to make something remotely useful, pretty or generally worth making you are pretty much forced to learn HTML/CSS as well. If you don't have a solid foundation in those yet, I advise against learning JavaScript. You can compare it to learning how to paint model airplanes, but not having the slightest clue how to build a proper model to paint in the first place.

    Java is a compiled language and is among the most punishing, picky and bitchy languages to learn. That said - it /does/ learn you to do this properly on the first try, but seriously... are you the type that reads a manual front to back twice before unpacking your new gadget? Or prefer to learn on the go? If you are of the latter kind, steer far away from Java as you will be utterly and completely frustrated. If you really do want to learn java (and I have no idea why, but please refer to the section below for more on that topic), I would suggest learning with something easier to get a basic programming understanding. Since you ask the difference between both languages, I'm freely assuming you have no prior experience.

    Now, on to the why of learning Java. There are several reasons why you would want to learn Java, but also many reasons why I wouldn't.

    In Java you can build two things: applets and applications. They are /not/ the same. (a 3rd would be applications on specific platforms such as Symbian or Android, although those are considered applications, to my knowledge).

    Applets: in-browser stuff. Remember those old school chatrooms where you had to enable a Java plugin? That's an applet.
    Applications: Server side stuff (such as a socketserver that could facilitate the chat applet's communication) and desktop applications. e.g.: MineCraft, Eclipse IDE, other stuff.

    An advantage of Java is that it's cross-platform, but I still stand by my advice to start with something more forgiving before moving onto the ruthless BDSM master that is called Java. He does not wield a whip, but a branding iron if you make a mistake.

    What is the reason you want to learn software development? As recommended before, I still stand by Python as being the best language to start with. PHP just has the most disgusting syntax ever, C#/Java are both really strict languages with an extremely steep learning curve, Ruby is a valid option as well, I think.

    If you still insist on learning JavaScript for whatever purpose, make sure you also read into CoffeeScript.

    A general resource to learn the absolute basics of programming can be found at: http://www.codecademy.com

    TL:DR; Don't start with Java. JavaScript is useless outside of webdevelopment. Decide what you want to develop first and choose a language based on that. Python is still my recommended language to beginners (and experts).

    My $0.02
    Posted in: Off-Topic
  • 1

    posted a message on I need a new hobby
    Hoi Niddro :)

    I don't know exactly where your interests lie, but if you enjoyed the programming part of JS, I can totally recommend having a look at developing in Python.

    It is the most fun (and imho: logical) programming language I have used to date (others are PHP, JavaScript, Java, C#.NET, ActionScript and Lua). It is really easy to learn, and extremely versatile. For example:

    There is a special game library for it, called PyGame: http://www.pygame.org/news.html

    There is an /awesome/ web-dev framework, called Django, which I have used myself for a few years now. It seriously takes all the crap from web-dev out of your hands and you can immediately start building your website: www.djangoproject.com. Also comes with an included free trainingbook (that's not the typical sloppy online "have to have" stuff, but really /good) @ http://www.djangobook.com/en/2.0/index.html

    Google App Engine hosts your Python applications for free, so you can make all kinds of Diablo theorycrafting tools, a website to display your Warhammer art, an online adventure game with a text interface - your imagination is the limit. (GAE also has it's limits, but you'll find out when the time comes)

    And unlike JavaScript it's a fullblown programming language that is officially being developed further at Google by a guy from the Netherlands :) (Guido van Rossum). It has file-system access, graphical interface libraries for desktop applications, cryptography libraries, Machine Learning / Artificial Intelligence libraries, etc.

    Oh and if you get good at it, esp. with Django, you can find a good job too, since good Python devs are scarce and I already know 2 companies in the Netherlands dying to find one ;)

    One thing to note though: If you /do/ decide to go the web dev route (seriously, I cant stress enough to set a weekend apart to give Django a whirl and follow their on-site getting started tutorial), be aware that apart from GAE you are going to be hard pressed to find a hosting service. Because of the way Python works it's not easy to provide virtual shared hosting, I've been explained, so you will have to either host it on a machine at home (usually not desirable) or get a VPS/Managed VPS.

    If you have any questions, feel free to ask. I haven't used PyGame myself, so can't comment on that.


    Another option, if you liked developing games, is looking at Corona (www.coronalabs.com), which is a cross-playform mobile development kit. You develop in Lua (I fucking loathed it, but it's all preference) and it's free to use until you decide to publish your game to a device (i.e.: the testing stage or... putting it in the AppStore/PlayStore). Think of it as "native Flash development".

    It is pretty versatile, reasonably low entry level to get basic things going. Once you get a bit more advanced, you have to fight around Lua's quirks though. Performance is decent. You could for example easily make remake your above posted JavaScript games as a Android/iOS game in a weekend (depending on previous programming experience I suppose).

    Hope the above helped :) Otherwise you could always look at learning a new language, to speak, that is, like Spanish or w/e floats your boat :)

    - Reinier
    Posted in: Off-Topic
  • 1

    posted a message on C++ quick question
    Or as a Python list comprehension:

    sum(math.sqrt(x) / ((x-2)*(x-1)) for x in range(3,101)) = 2.244

    Sorry, couldn't resist :offtopic: :P
    Posted in: Off-Topic
  • 1

    posted a message on Hotfix not yet implemented!
    Kara, you do realize you are kind of being not too kind to yourself there, right ;)?

    The confusion is kind of understandable though..first they say "going live tomorrow" and in the latest update "going live today". Keyword would be "going", but nevertheless, could be more clearly.

    Enfin, try again tomorrow indeed!
    Posted in: Diablo III General Discussion
  • To post a comment, please or register a new account.