New to Coding

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: New to Coding

Postby Steax » Mon Mar 19, 2012 12:47 am UTC

Yeah, the cool part of PHP's online docs are the examples. The core docs are also pretty much fine for defining behavior. The examples then extend that into real-life use, which gives it a good balance between being a strict "specification"-like document and just a bunch of examples. They also tend to explain pitfalls, security issues and tricks on how to mold the built-in functions to something more reasonable.
In Minecraft, I use the username Rirez.

Lleu
Posts: 77
Joined: Sun Nov 25, 2007 9:59 pm UTC

Re: New to Coding

Postby Lleu » Wed Apr 03, 2013 7:54 pm UTC

What can I do with coding? I want to make games, a graphing program, and bots that play games. That's about all I can think to do. However, I get the feeling that there's a lot I'm missing out on if I just do that. Are there any areas that would be beneficial to explore, especially if I'm considering a career in about three years? I'm learning Python.

User avatar
headprogrammingczar
Posts: 3069
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: New to Coding

Postby headprogrammingczar » Wed Apr 03, 2013 9:34 pm UTC

Everything a computer can do needs to be programmed by someone. Take your average boring accounting program. Someone programmed all the different kinds of taxes, what they apply to, exemptions and other kind of things that an accountant can do without even thinking. Now tax rates change, so someone programmed a way to get updated rates from a government website. Someone had to program the library you are using for network interaction. Someone wrote the specification for HTTP, JSON (it's somehow a very modern program), TCP. The network card sends the information, but someone programmed the network card.

Yes, there's software on individual pieces of hardware too. For instance, the wifi card of a printer. On the other end of the network connection is a different networking library, for any number of reasons. Someone wrote the webserver, which accepts the network connection. They aren't that modern, so it runs another program someone wrote that actually provides the data.

For actual ideas of what to do, pick something that you do often that annoys you. Write a program to do it for you. As you write more programs, you will find parts of programming that annoy you. Write libraries that make those parts less annoying. Don't like some feature of Python? Download the interpreter source and change it (of course, you won't be writing Python anymore...).
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you

User avatar
Jplus
Posts: 1686
Joined: Wed Apr 21, 2010 12:29 pm UTC
Location: Netherlands

Re: New to Coding

Postby Jplus » Wed Apr 03, 2013 9:58 pm UTC

Another thing you can do with coding is participate in the red spider project. See my signature.
"There are only two hard problems in computer science: cache coherence, naming things, and off-by-one errors." (Phil Karlton and Leon Bambrick)

coding and xkcd combined

(Julian/Julian's)

User avatar
Tomlidich the second
Posts: 1230
Joined: Thu Mar 22, 2012 5:38 pm UTC

Re: New to Coding

Postby Tomlidich the second » Thu Apr 11, 2013 6:55 pm UTC

i am that guy who has the odd question of: how do you stay coding?

i have delved into python and java quite a bit but i end up getting distracted and focusing my attention on something besides learning how to properly code. im still a newbie, even though i started learning fresh outta high school almost three years ago.
Image

User avatar
WyldStallyns
Posts: 26
Joined: Mon Jan 30, 2012 5:09 am UTC

Re: New to Coding

Postby WyldStallyns » Sat Apr 13, 2013 2:40 am UTC

Lleu wrote:What can I do with coding? I want to make games, a graphing program, and bots that play games. That's about all I can think to do. However, I get the feeling that there's a lot I'm missing out on if I just do that. Are there any areas that would be beneficial to explore, especially if I'm considering a career in about three years? I'm learning Python.



Well, C# is a pretty good place to start for making games, assuming you're at least familiar with computer logic. And from what I know, it's what a lot of developers use to make Xbox games, and using Microsoft's XNA framework you can upload what you make to the Xbox Live Arcade (If you have the license for it, costs around $100 a year) There are also plenty of good tutorials around for it. Searching "C# XNA" on Google or Youtube can probably get you to some good tutorials. (I'm not 100% sure how many Xbox games are actually made in C#, if you're interested you could probably look it up) XNA is also used in Windows Phones and Zunes (And unlike Xbox, you can upload games and apps to those stores for free, maybe make a bit of money if they sell)

As far as game bots go, if the game is popular enough there may be entire websites to botting in them. (Just know that most game companies consider botting a cheat and you might get yourself banned for it) I know there are a few sites for Runescape botting with tutorials. It's in Java, which is very similar to C#. (C# was actually created by Microsoft as a response to Java) WoW probably has some bot sites you could find as well, as with most popular MMOs. I'd suggest looking there for specific help.

If you're into The Elder Scrolls series, Bethesda releases the Construction Kit, which is pretty much the same tool they used to make the games. (It's missing a few of the functions that they can't release for legal reasons, but that's not a problem) All it requires is the PC version of Morrowind, Oblivion, or Skyrim, and I believe Fallout and New Vegas have Creation Kits as well. Here's a link to the Oblivion CS wiki and here's the one for Skyrim. Modding for those games is more game design and less programming, but it's still a fun tool and does involve programming if you intend to make more complex mods. I could be wrong, but I believe the code for Bethesda games is a modified version of C or C++.

Also, if you are still in school, take all the computer science courses you can. Having an instructor and other kids your age learning the same thing as you helps a ton. Also, it is often said that one of the best ways of making sure you know something is to teach someone else. Once you start to get something, helping someone else out can both increase your knowledge on the issue, and prove to yourself that you know what you're talking about. This also holds true for just about any subject.


Tomlidich the second wrote:i am that guy who has the odd question of: how do you stay coding?

i have delved into python and java quite a bit but i end up getting distracted and focusing my attention on something besides learning how to properly code. im still a newbie, even though i started learning fresh outta high school almost three years ago.


If you can think of a big project to work on, like a game or an app that you could upload to the ipod/android appstore that you want to work on, it can help you stay focused. If you have a goal, you'll have more motivation to pursue it than if you just follow tutorials and make a few simple programs. If its good enough, there could even be some money in it. Who knows, you might create the next Angry Birds.

If you can find something that you have fun working on, chances are you will keep at it. And if you ever get stuck, the internet has tons of tutorials on just about any language you can think of.
"I give the Internet credit for everything good that has happened since 1969." - Bob Metcalfe, inventor of Ethernet.

User avatar
snowyowl
Posts: 464
Joined: Tue Jun 23, 2009 7:36 pm UTC

Re: New to Coding

Postby snowyowl » Wed Jun 19, 2013 11:56 am UTC

I have a question that falls into the scope of this topic.

I'm not new to coding - I've used Javascript and some occasional C++ too - but I'd like to know what language I should use for web scripting. This is really a practice project; I don't want to write the next Facebook, just make a fun single-purpose app that people can mess around with for five minutes. Interfacing with a database o some sort may or may not be required - I haven't gotten that far yet.

I've written a few lines of Python and Ruby, and have glanced vaguely in the direction of PHP, but obviously there's no simple answer to the question "which one is best?". I'd prefer something free and probably open source, which I think rules out ASP. An environment that's good for learning in would be best; something that I can put on my CV and get hired for is a bonus.

Does anyone have enough knowledge of the alternatives that they can point me at one of these languages and say "Yes, that one."?
The preceding comment is an automated response.

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: New to Coding

Postby Steax » Wed Jun 19, 2013 12:12 pm UTC

PHP has the best community support out there, but it, like many other popular languages, has extreme clutter between the messy and the good. It's also not very consistent, and it's not the safest thing out there, but it can learned and made safe and fast if you desire. I still point people towards it. Others pick Node JS or Ruby on Rails, and there are other options out there, which you might consider if you like those languages. But they're not widely used technologies yet, at least not as wide as PHP/ASP.

In short, PHP has C-like syntax that, with a bit of practice, gets the job done, and it has a lot of supporting libraries and communities out there. It's also dead easy to install anywhere, get a development environment up in, and find hosting for. Feel free to look up Node JS, RoR and others and see what they have to offer.
In Minecraft, I use the username Rirez.

User avatar
Xanthir
My HERO!!!
Posts: 5055
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: New to Coding

Postby Xanthir » Wed Jun 19, 2013 4:24 pm UTC

As a PHP user, SAVE YOURSELF. GET OUT WHILE YOU STILL CAN. IT'S TOO LATE FOR ME, JUST RUN.

I recommend NodeJS, or one of the Python server things. JS and Python are both very interesting languages.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

User avatar
sparkyb
Posts: 1091
Joined: Thu Sep 06, 2007 7:30 pm UTC
Location: Camberville proper!
Contact:

Re: New to Coding

Postby sparkyb » Wed Jun 19, 2013 5:22 pm UTC

Most of the person web scripting projects I've done back when I did those sort of things were in PHP. What I liked about it was that it was pretty easy to do things fast. It was basically as easy as creating the html pages for the site and then embedding logic to write some of that HTML dynamically. It could be a good place to start because of how easy it is to prototype something fast.

That said, now that I have more experience, at work we mostly use Django, a Python web framework. Not only is Python a much better language than PHP, but using a web framework has some advantages of doing a bunch of the tough things for you, abstracting database access and logic from presentation, and encourages/enforces a lot of other good design practices. I find that it requires a little more scaffolding to get something started, but that's probably a worthwhile investment later on. Starting with PHP may be easy but it might also teach you some bad habits, and if you have to basically learn a new language/framework anyway, maybe it is worth starting with something good.

User avatar
Steax
SecondTalon's Goon Squad
Posts: 3038
Joined: Sat Jan 12, 2008 12:18 pm UTC

Re: New to Coding

Postby Steax » Thu Jun 20, 2013 1:13 am UTC

Xanthir wrote:As a PHP user, SAVE YOURSELF. GET OUT WHILE YOU STILL CAN. IT'S TOO LATE FOR ME, JUST RUN.

I recommend NodeJS, or one of the Python server things. JS and Python are both very interesting languages.


I... I think it's just too late for me now. I'm trying to convert to NodeJS but for some reason... I just can't get into it. Even ASP makes more sense to me right now. But yes I wish I started with something other than PHP.

Maybe the thing is that I like having full control down to the lowest detail, and prefer building from the ground up instead of relying on frameworks. Those are nice when you just need to get a site done - you get nice things like admin backends and all - but the majority of my work demands a lot of low-level work. PHP has usually given me the easiest access to this stuff. I don't typically like things that do things like generate forms or error messages.

That said, NodeJS + MongoDB/CouchDB are what I use for simple projects right now.

But yeah, we've thrown out the big names, go ahead and look at them and see which you like more, snowyowl.
In Minecraft, I use the username Rirez.

User avatar
Aaeriele
Posts: 2123
Joined: Tue Feb 23, 2010 3:30 am UTC
Location: San Francisco, CA

Re: New to Coding

Postby Aaeriele » Sat Jun 22, 2013 7:02 pm UTC

snowyowl wrote:Does anyone have enough knowledge of the alternatives that they can point me at one of these languages and say "Yes, that one."?


You're correct in that there's no real "right" answer, but I would say that in the current industry environment, Python is a pretty good choice for "fairly straightforward, can be put on a resume, works well." Nearly everywhere that does web application development, even if they don't themselves work in Python, will recognize Python and know how such skills translate.

There's also a fair amount of support out there for easy infrastructure bases on which to deploy Python apps if you're just messing around - Heroku is probably the most notable for its simplicity and free tier, but there's also interesting variants like PythonAnywhere.

Python web microframeworks let you create a web application with only a minimal amount of boilerplate, so it's not as if you're having to choose between the simplicity of PHP and the giant leviathans that are Django (Python) and Rails (Ruby). If you do decide to go the Python route, I'd suggest taking a look at Flask as a microframework that is good at staying out of your way, but also offers a bunch of functionality if you want to use it.

Steax wrote:Maybe the thing is that I like having full control down to the lowest detail, and prefer building from the ground up instead of relying on frameworks. Those are nice when you just need to get a site done - you get nice things like admin backends and all - but the majority of my work demands a lot of low-level work. PHP has usually given me the easiest access to this stuff. I don't typically like things that do things like generate forms or error messages.


I think you'd like Flask too. :)
Vaniver wrote:Harvard is a hedge fund that runs the most prestigious dating agency in the world, and incidentally employs famous scientists to do research.

afuzzyduck wrote:ITS MEANT TO BE FLUTTERSHY BUT I JUST SEE AAERIELE! CURSE YOU FORA!

benkapparate
Posts: 7
Joined: Fri Oct 11, 2013 5:05 am UTC

Re: New to Coding

Postby benkapparate » Fri Oct 11, 2013 6:04 am UTC

Do you guys think JS will take over Java in college / high school education?

User avatar
Thesh
Has the Brain Worms, In Case You Forgot.
Posts: 5013
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

Re: New to Coding

Postby Thesh » Fri Oct 11, 2013 7:04 am UTC

The only place JavaScript is really used is for the front end of websites (okay, ActionScript is based on JS and used for flash, but even that is dying). Even if the direction we are heading is towards web based applications, a lot of the work is on the backend, and JavaScript isn't used much there. You might see C# or Python being taught instead of Java, but not JavaScript, which will be taught only if you are learning about front end web development.
But I do and I don't want to care anymore.
If I close my eyes, would it spare me the sight of decay, corruption?
How we nurture destruction and everything that will doom us all.

lgw
Posts: 435
Joined: Mon Apr 12, 2010 10:52 pm UTC

Re: New to Coding

Postby lgw » Thu Oct 17, 2013 8:24 pm UTC

JS seems to be taking over from Scheme, not Java. You can use it to teach functional programming, and while I find its object model terrible, Scheme has no object model at all, so no loss there.

Java schools? Don't get me started on what I have to teach people we hire from Java schools.
"In no set of physics laws do you get two cats." - doogly

User avatar
Xanthir
My HERO!!!
Posts: 5055
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: New to Coding

Postby Xanthir » Fri Oct 18, 2013 4:49 am UTC

Thesh wrote:The only place JavaScript is really used is for the front end of websites (okay, ActionScript is based on JS and used for flash, but even that is dying). Even if the direction we are heading is towards web based applications, a lot of the work is on the backend, and JavaScript isn't used much there. You might see C# or Python being taught instead of Java, but not JavaScript, which will be taught only if you are learning about front end web development.

Node is used quite a lot, actually.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

jpk
Posts: 607
Joined: Sat Nov 13, 2010 7:33 am UTC

Re: New to Coding

Postby jpk » Fri Jan 24, 2014 6:07 am UTC

lgw wrote:Java schools? Don't get me started on what I have to teach people we hire from Java schools.


Oh, please!. Don't jump on the Spolsky bandwagon - it was a stupid meme when he started it, and it's still as stupid as ever.
You'll complain just as much about the products of js schools or haskell schools or whatever comes along next as the "it language" for teaching. New kids fresh out of school are often idiots. That's not going to change just from changing the language they're taught in.

DaveInsurgent
Posts: 207
Joined: Thu May 19, 2011 4:28 pm UTC
Location: Waterloo, Ontario

Re: New to Coding

Postby DaveInsurgent » Thu Sep 10, 2015 5:07 am UTC

Sure, but those "idiots" go on to become "senior developers" with 25 layers of abstraction and all sorts of awful ideas about system design and while you're totally being reasonable to say that a programming language isn't going to save them, there are many facets of Java and the object-oriented programming bandwagon that actively contribute to the problem.

Xanthir wrote:Node is used quite a lot, actually.


This. Game logic layers written in it. Node v4 is now ARM-tested as opposed to just best effort. ES6 and ES7 are adding a lot to the language. Unless you're doing intensive computation, Node is where it's at right now. The module system is excellent, the community is alive and well, and I'm one of the crazy people who legitimately enjoy most aspects of the language.

Yes, web dev is increasingly being dominated by Node and JS in general (I'd "argue" that web dev is increasingly dominating the profession, not that it's better or anything, just that there's a larger demand and a greater # of employers that crop up out of thin air daily). But plenty of people are using Node to drive small things like Rasperry Pi and Arduino and so on.

JavaScript is probably more portable than Java right now where it *counts* and if you want to develop a desktop application (for whatever reason? ugh) you can take your own slice of V8/WebKit and just use an already well established and highly performant rendering/layout system.

Web dev has basically become about a platform that is blurring the lines between what has to be "server side" and "client side" and JS is at the heart of all of it.

EmelinaVollmering
Posts: 11
Joined: Tue Oct 18, 2016 10:24 am UTC

Re: New to Coding

Postby EmelinaVollmering » Tue Oct 18, 2016 10:37 am UTC

I would say, try to implement as many algorithms you can (during your 20's). Further, try to build algorithms that have multiple output constraints and try to implement the full solution ( don't give away, if you have little issues or remove those constraints).

What I am trying to say is, always implement full solutions and solve problems that came in the way. First stick with any language (it will not a issue) and build your logic. Keep on doing this exercise for more than 6 months and you will know the code easily.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 4 guests