Would a better text editor help sgreger? I don't know what's available for Apple, but I always liked Notepad++ on Windows.
Does anyone here know PYTHON (the programming language) or any others?
Collapse
X
-
Originally posted by lxskllr View PostWould a better text editor help sgreger? I don't know what's available for Apple, but I always liked Notepad++ on Windows.
Comment
-
-
Originally posted by ratcheer View PostYes, way down in the middle of OS X, it is BSD UNIX. Everything is there, and it is as good as or better than Linux. In fact, I have been using mostly Ubuntu for the past couple of years, and I am considering changing to PC-BSD, myself.
Tim
Mac is very good, the combination of the lock they put on the hardware and software QA lends itself to a rock solid product. I always say the main difference if I chose to buy a mac was basically trading the time I take configuring my Linux systems for paying Apple to make my machine a work of art for me.
However, for Programming, software development, especially in certain languages, (C, C++, Python, Java, php, even Ruby) Linux has a lot to offer over other OS's (as does BSD). The very nature of how open they are by default is much better for someone who isn't scared to dig into the guts.
Ken
Comment
-
-
Originally posted by captncaveman View Postjust for shit and giggles did you install python on your mac or did you use the pre-loaded set of tools on your mac? I have also got a few responses from some mac python guys saying you may need to install and config python yourself, but don't remove the preloaded python on your OS since some system utilities will need that version. Also they mentioned there could be a conflict with the pre-installed dev tools and IDLE. They also mentioned Leopard's Xcode environment supports python development try using this instead of IDLE.
Im gonna google what Leopard's Xcode environment is and then I will let you know lol. I installed 2.7.1 myself after downloading it from the python site, but I first got the 64 bit version and then afterwards installed the 32 bit version because IDLE wasn't working.
So I installed it myself but did not configure anything, just ran the installer that unpackaged it and that's about it.
Comment
-
-
Originally posted by sgreger1 View PostOkay i'm going to try this vitual box thing tonight if I can. I can't believe how complicated this is, it used to be you just opened a compiler and then started writing code, but I guess it's a differetn world now.
I need to learn more about linux too because I too am very big on the open source movement. I do think there is a time and place for closed/for-profit things but I also dig the community crowdsourcing the developement things so I would love to get into linux more. Hopefully this virtual box will help me be more successfull than last time.
Ken
Comment
-
-
Originally posted by ratcheer View PostYes, Python is object oriented. Basically, it refers to a construction where everything a program deals with is an object that not only has value, but also "understands" methods that deal with it. For instance, 2 is not just a number, when instantiated in a program it also "knows" how to add another number to it, how to print itself, etc. Then, programming becomes an exercise in sending proper "messages" to objects to accomplish the needed tasks. Also, it is the design and construction of higher level objects and methods. I am sure this is as clear as mud.
Here is a reference: https://secure.wikimedia.org/wikiped...ed_programming
Tim
Thanks! That actually makes a lot of sense based on the very little I have read on python tutorials so far.
Comment
-
-
Originally posted by GoVegan View PostI tried a dual boot system before using Linux and Windows. Things might be better now but it can be a headache. I remember a while back there was a computer that tried to merge IBM and Apple but it never worked right. IMO, the best thing to do is have a computer dedicated for each operating system you use. The cool thing about Linux is it does not need nearly as much space as Windows and you can join several older computers together to make one larger system.
Ken
Comment
-
-
Originally posted by sgreger1 View PostCan you guys help me understand what "object oriented" means? What makes OOP's different than other types of programming languages? Python is object oriented, right? What are the advantages/disadvantages of this over other types?
Ken
Comment
-
-
Originally posted by GoVegan View PostI thought VB was amazing especially compared to the old style Basic. You can do all kinds of stuff with it and GUI's are a breeze and they look clean. It is also fairly easy to learn. The only drawback is that the enterprise edition of VB was fairly expensive but they do have a student version our for a reduced cost.
Ken
Comment
-
-
Originally posted by lxskllr View PostWould a better text editor help sgreger? I don't know what's available for Apple, but I always liked Notepad++ on Windows.
A poster already mentioned vim. Programming or not vi is a good thing to know. Of course now that I said that here comes an EMACS guy ready to flame me.
Ken
Comment
-
-
Originally posted by devilock76 View PostThat is a good question, is he maybe using some type of rich text editor, that would completely explain all the syntax errors.
A poster already mentioned vim. Programming or not vi is a good thing to know. Of course now that I said that here comes an EMACS guy ready to flame me.
Ken
I am using the stadard text editor installed in mac. It is so simple it doesn't even have a way to chose the font I don't think. Do I need to write it in a certain font, like "terminal"? I am guessing it defaults to arial or something that maybe that is what's causign the problem.
But none of that matters BECAUSE IDLE WILL NOT EVEN LOAD A .PY FILE FOR ME TO TRY.
I can't even load a .py file that say: PRINT "Hello World!", it freezes it up.
It is impossible to manually type the code into the interpreter because then it gets ahead of itself, I press enter to go to the next line and it executes the code, so it's impossible for me to write more than 1 or twi lines of code without loading a .py file but it will not let me do it!
Comment
-
-
Originally posted by sgreger1 View PostI am using the stadard text editor installed in mac. It is so simple it doesn't even have a way to chose the font I don't think. Do I need to write it in a certain font, like "terminal"? I am guessing it defaults to arial or something that maybe that is what's causign the problem.
But none of that matters BECAUSE IDLE WILL NOT EVEN LOAD A .PY FILE FOR ME TO TRY.
I can't even load a .py file that say: PRINT "Hello World!", it freezes it up.
It is impossible to manually type the code into the interpreter because then it gets ahead of itself, I press enter to go to the next line and it executes the code, so it's impossible for me to write more than 1 or twi lines of code without loading a .py file but it will not let me do it!
$ echo 'print "hello world"' > hello.py
$ python hello.py
Note that the dollar sign represents the terminal shell prompt, don't type that part in. Also notice the single quotes that enclose the text that we want to echo into the hello.py file.
Comment
-
-
Originally posted by sgreger1 View PostI am using the stadard text editor installed in mac. It is so simple it doesn't even have a way to chose the font I don't think. Do I need to write it in a certain font, like "terminal"? I am guessing it defaults to arial or something that maybe that is what's causign the problem.
But none of that matters BECAUSE IDLE WILL NOT EVEN LOAD A .PY FILE FOR ME TO TRY.
I can't even load a .py file that say: PRINT "Hello World!", it freezes it up.
It is impossible to manually type the code into the interpreter because then it gets ahead of itself, I press enter to go to the next line and it executes the code, so it's impossible for me to write more than 1 or twi lines of code without loading a .py file but it will not let me do it!
Since this is mac your user directory should be /Users/(username) or simple type cd ~, and I am pretty sure when you open the CLI then you should already be in your home directory. Hopefully your file is there but it might be under a sub directory. You can do a locate filename to find the path to it. I know there are easier ways to do some of these things on mac but this is the way I know.
Anyway once there you can do one of the following vim filename, this brings up the VI Improved editor, this is a pure ascii text editor, look through your file to make sure there is nothing other than the coding you expect to see. Just a note to leave vim without saving type :q! and to leave with saving it is ZZ.
That or you can type more filename which will output your file to the cli and you can use the space bar to page through it. If it is really short cat filename will work as well. You also could do less filename but I don't tend to use less very often, others do.
Now if you are ready to run your file you should be able to just type at the cli python filename. If you get a filename not found you might need to say python ./filename or possibly a full path to your file. But the first ones should work. If the full path includes your home you can use the ~ example python ~/code/snippets/hello.py.
Why am I telling you this way to do it. Well this would be the way you would do it on 99.9% of the *nix boxes out there if you prefer to work in the CLI. Be it FreeBSD, Linux, Solaris, and yes these methods should translate to the mac.
Any output you get feel free to post back here.
Allow me to review this in a code window:
Code:cd ~/code/snippets cat hello.py python hello.py
Code:chown username hello.py chmod 755 hello.py
Yes I know that gives him all access to it. That is just my habit of how I set permissions on stuff I am actively developing and am the owner for. Trying to keep this simple and avoid some unknown pitfall of the Mac python implementation that expects some extra permission of some sort.
Ken
Comment
-
-
Originally posted by danielan View PostJust a couple observations...
1. Did you look into the local job market to determine if python is a valuable skill in your area? (I like and use python on a semi-regular basis, but Java, C# or even JavaScript might be more marketable right now - depending on your interests, the local market, etc.) Python is kind of a niche language right now, IMO.
2. Do you have an affordable junior college close? You seem to have several things to learn - you can learn them through education, experience or a combination... A couple intro night classes might be well worth the expense/time. Skip the Kaplans, the ITT's, the DeVry's, etc. Just normal public junior college. You'll still have things to learn, but this will build a foundation.
3. +1 on the vi
4. http://diveintopython.org/
5. Linux is great, blah, blah, blah... You totally don't have to mess with linux or virtual box, or eclipse, or or or or to learn programming in general or Python in particular.
6. I'd probably start with javascript anyway...
Every programming language is nothing more than a tool. All of them can do many jobs but some excel at others. I mean if you were determined you could build a website in C, but there are better languages for that task.
If you really want to learn programming and I mean learn it, not just I want this language for a job at this time (because languages go in and out of vogue). Then python is a good stepping stone to get you to the C/C++/and java world of programming. Once you master those I doubt there is a language you would not be able to master with nothing more than the handbook.
Linux is the "purest" python implementation and the best way to get your feet wet in free programming examples you can run. For example let us say you are ambitious and want to build a DAW in python, you can download the source for jokosher, compile and install it. Linux is also free.
As for virtualization, that is fast becoming "THE WAY" to run development environments so I would say yes it is important.
Ken
Comment
-
-
Originally posted by danielan View PostI hear you. I just disagree.
Sgreger is trying to change careers. Mucking about with virtual machines and linux is something he will certainly want to do someday. That day doesn't have to be today. If you want to learn to program - these are not prerequisite skills. If you want to learn to program Python - these are not prerequisite skills. Not by a long-shot. Except for hobby BS at home I never do python under linux - usually I do it under AIX or Windows. I don't do OSX, but python certainly runs fine under OSX. These are distractions from his goal, IMO.
I'd still do javascript. There's basically 0 cost (time or effort) to start, you will learn the basics of programming (loops, conditionals, recurssion, etc, etc, etc), javascript isn't going to die off any time in the foreseeable future (quite the opposite actually), GUI stuff is slightly less likely to be sent off-shore, etc.
My guess would be that the main growth area in development over the next 10 years in the US will be mobile and web applications. Javascript seems like a good skill (more useful than python) - initially some client-side stuff - then common libraries (jQuery etc) - much later server side (i.e. node.js). All mixed with a good understanding of HTML (HTML, XHTML, HTML5, CSS, SVG, etc).
But I really don't care enough to argue.
Good luck sgreger! IT is an awesome field to work in - you will never be bored.
The world at large is switching to this development model, if he is training for a job there are skills that can go with that. I have never been in an interview that only asked me about the one language I knew. I got asked questions about database environments, SLC methodologies, OS and networking environments, Change control management, you name it, the entire sphere of IT management and processes has come out over the span of my interview history.
All that being said let us explain just how much Overhead installing a virtual machine with python will be on his computer.
1. Install Virtual Box, simple enough for anyone to download and install from Oracle over WWW. (about 2-5 minutes depending on your internet connection)
2. Create a new virtual machine, pretty simple, or he could download a prebuilt vdi, in fact I could build one and send it to him. (3 minutes to do it yourself, 5 if you read the prompts that tell you most everything you need to know)
3. If you built your own virtual machine instead of a prebuilt vdi then download a linux or BSD distro.
No-GUI - Arch, Debian-netinst, or FreeBSD (5-30 minutes depending on distro and internet connection)
GUI - Fedura, Ubuntu, OpenSUSE, Mandriva (roughly the same as above)
4. Install what you downloaded from 3. Just accept defaults with maybe full install options for the installers above (5-20 minutes depending on the distro, you are installing it on the VM so insert the disk, boot the vm and it will ask you where the install media is, boot as in start, not reboot the computer itself)
5. If not already installed above, install python. (2 minutes)
So what is that, worst case about an hour's worth of work, most of it downloading or the installer running on it's own, best case maybe 30 minutes? That time to have a controlled environment that you can easily snap shot, represents what you might see most often in the really real working world, starts adding more skills to put on your resume, and protects your main computer from your mistakes and experiments gone awry.
All that in light of it is not working on his mac, he will rarely if ever be developing python for mac's in most of the corporate world, and how long has been spent in this thread?
If you ask me it is a perfectly sensible solution, but opinions vary.
Sgreger. If you decide to go the VM/VirtualBox route I can help you with that. The mac will easily handle it, especially a non-gui environment.
For mobile development I guess part of it depends where the HTML5 vs Flash fight goes over the next few years. Considering the Iphone market share Objective C is a good thing to learn if you want to develop for the iPhone/iPad.
However at this stage of the game he is really just learning programming. For that python is a great first language. Javascript has value too, but more in the web world at this point. Javascript vs Python. Depends where you are going with it. Python is unique in being so general purpose and cross OS without some of the complexity and overhead of Java. Python seems to have a different "vs" language depending on the intended use.
Python vs Java
Python vs Ruby (or usually Zope/Plone or Django vs Rails)
Python vs PERL (for the script writing SA's out there)
Python vs PHP
Ken
Comment
-
Related Topics
Collapse
-
Please delete if not allowed:
Hi guys,
My name is Darius and I am working with Swedish Match on the legalisation of snus in...-
Channel: Snus Talk
14-12-21, 06:24 PM -
-
by CrowState officials have been changing the language used in many laws, including thousands of words and phrases, many written more than a century ago when...
-
Channel: People and World Around Us
-
-
This one is interesting...because it would be mandatory...and it's Federally funded.
MANSFIELD (CBSDFW.COM) – Some Students at Mansfield...-
Channel: People and World Around Us
-
-
by Sal1000usThe term New World Order (NWO) has been used by numerous politicians through the ages, and is a generic term used to refer to a worldwide conspiracy being...
-
Channel: People and World Around Us
-
-
by wa3zrm50-Foot Dead Parrot Drops Into London to Promote Monty Python Reunion
Adweek ^ |
What's a Monty Python reunion without a dead...-
Channel: People and World Around Us
-
- Loading...
- No more items.
Links:
BuySnus.com |
SnusExpress.com |
SnusCENTRAL.com |
BuySnus EU |
BuySnus.at |
BuySnus.ch |
SnusExpress.ch
Comment