Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
So I managed to write a program to convert a word to Pig Latin. From nothing. Pretty cool if you asked me since I've never been much of a coder. How did I get that far in 6 hours of training? Code Academy.
Is anyone familiar with this or other great tool to help me learn Python? Seems it's now expected of me at my job so I'm being paid to learn it now, though I'm not progressing very fast. The benchmark is some guy who already knows java(script?) according to my boss that did the Code Academy track in 8 hours. I'm 8 hours in now and about 38% done. At this point I really should finish to Code Academy method either way. The lead Python developer at my job is constructing a Python challenge that I'll have to complete before I can be considered proficient or at least competent in it. By that point I'm guessing I'll want more skills than just the Code Academy stuff. Any direction or assistance you can offer to get me doing this right? Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
I love Python. Pretty much all of my one-off helper scripts I write these days are either Bash or Python. I'd really like to know more about your coworker's "Python challenge" if you're allowed to share it.
Two book-website lessons that I'd recommend looking at are: Learn Python the Hard Way Dive Into Python They are both a bit old (written in the early 2000s), but the basics are still pretty sound. The only potential gotcha is that these books cover Python 2.x, not Python 3. A fair number of things changed in Python 3, enough that it caused a small schism in the developer community. Some major third-party Python libraries still only work in 2.x. So, the books may be just fine for you if your coworkers are still using 2.x. The last time I really looked at these two sites was several years ago. There are probably newer/better resources today. I may take a look around the interwebs this weekend and post if I find some. The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
quote |
Veteran Member
Join Date: May 2004
|
Ditto for Dive Into Python, that's how I learned it.
Would also recommend: http://www.ibiblio.org/catalog/items/show/3775 ObNurdJoke: Silly turtle! Python doesn't have pointers! |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Quote:
Oh, and this one is also for Python 2.x. One of the quickest way to recognize Python 3 versus an older Python version in a tutorial is that if you ever see a print statement without parentheses, the tutorial predates Python 3. Python 3 changed print from a statement to a proper function (among many other cleanup-type things). The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
|
quote |
Veteran Member
Join Date: Nov 2006
|
Seconding LPTHW. Went through it last year when I was getting started with Python and found it helpful. If you're interested in a project based online class using python, it might be worth trying Udacity's Intro to programming. Haven't done the class myself, but know people who have and they all liked it.
|
quote |
Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
Thanks for the input on these guides/references. I've bookmarked the ones to be bookmarked and noted the others. I've enjoyed the little bit of "coding" I've done with the Code Academy, but looking forward to being more capable and proficient. I don't like feeling like I don't have a clue when I am having much more expected of me.
Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Quote:
The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
|
quote |
Veteran Member
Join Date: Nov 2006
|
The Udacity course? I've been meaning to do their algorithms class...mainly because it's taught by Michael Littmann who is one of my heroes and his early work on POMDPs was influential on my dissertation.
|
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Yeah, the Udacity course. The description of "build a search engine" for the one you linked sounds a lot like the one my colleague described. I haven't actually used any of them myself, though.
The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
I reached out to some colleagues about this topic, and here's what they had to say. These are all really smart guys whom I respect and trust. I mentioned the three online Python books that have been posted here, and I asked what else they might recommend for an IT guy who wants to get started programming with Python. I'll quote some of their replies here:
Quote:
Quote:
Quote:
Also, about the "C Programming Language" book... the more I think about it, that's actually a clever idea. Being able to write or at least understand C programs is an essential skill that all software developers should have. C is actually surprisingly simple, and many other modern languages are based on its principles, syntax, and keywords. Knowing C means you can probably pick up (or at least read and understand) several other languages with a small bit of effort. This book is a gentle introduction to C that teaches by example. It's a bible that most programmers I know either own or have read at some point in their lives. If you don't want to swallow the ridiculous price tag for it, it's not hard to find scanned and OCRed as a PDF with a few searches, not that I could condone such a thing. If you really want to pursue programming as a larger part of your career, I would highly suggest giving the C book a read. If you just want to get enough Python-specific coding skills to get through your job, you could pass on it, but I'd still recommend reading it in the not too distant future. The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
|||
quote |
Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
Thanks for doing that Brad! I appreciate the input. I took intro to C++ my last semester of college and didn't do very well in that class at all. It really wasn't pretty. This is why for the longest time I've told myself, and others, that I'm a tech not a coder. I can edit code and manipulate it, but writing it is a whole different thing all together. I really want to learn Python at this point, so I hope to make it through this.
Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
FWIW, C is simpler than C++ and should certainly be easier for a beginner to understand. C++ is a superset of C that changes some compiler behaviors, expands the standard library, and adds object-oriented features. C++ may be more powerful, but that power comes with more language complexity (though code you write may be simpler) and a steeper learning curve.
That said, unless you count recently flipping through the C book, I haven't read or written a line of C or C++ code in about ten years. The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
quote |
Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
I didn't realize that at all. Back when I was a SysOP for WWIV (over 20 years ago) I paid for the source and modified it all the time. Made some major edits too, an this was in C++. I didn't realize they were different.
Well, at least I have a more likely chance of picking up and enjoying C or Python then. Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Progress update!
That is to say the people need one! How's the Python coming? |
quote |
Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
Still working through the code academy coursework. I'm about half way through it. I haven't put much time into learning this in my off time because of family obligations. I really need to because this pace is horribly slow. I feel like I'm getting the concepts, still not seeing a big picture of how I'm going to take these concepts and make them usable for tasking.
I still default to bash scripting in my head when thinking of ways to automate. I've built a few little things in this course that seem like they will be useful. I guess the more I think about it I haven't grasped building the overall plan for new code. I'm go with modifying in most cases because it's already been done. I am going to get through this though and be good. I think I need a video lecture to watch to help me understand some of this stuff more. In electronics school in the Navy I was told to draw a big red button that said "I believe". Any time they hit topics that they weren't going to go more into detail they said push that button. I feel like I'm learning this doing the same thing. I want more understanding because it makes the little details easier to figure out. I'm doing pretty good with the syntax at least! That was always a problem for me. Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
So I must be missing something that I would think it pretty basic. I learned how to write functions doing the codecademy coarse but don't know where to look to find out about functions already written. I understand the ones written custom for my organization won't be as easy to find, but how can I find functions that are already done and documented. You know, python-wide functions?
I've been tasked to convert some of our older bash scripts to python but don't want to reinvent the wheel and write new functions when they might already be done. Got any pointers? I'm having to use python 2.7 for my job. Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Senior Member
Join Date: Feb 2005
Location: Chicago
|
Perhaps a cheat sheet, like this one, is what you need?
To go a little deeper, the documentation for the Python 2.7 standard library (i.e. all of the included modules/packages) is not half bad. |
quote |
Veteran Member
Join Date: May 2004
|
Yup. Use the standard docs, but google like mad.
|
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
What does Python compile on? I've enjoyed dicking around with PHP for web work, but I don't have an environment set up locally to use it so it's only a web thang for me (and that's easy and fun).
... |
quote |
Making sawdust
Join Date: May 2004
Location: Minnesota
|
Python doesn't compile, it's interpreted like php
|
quote |
Senior Member
Join Date: Feb 2005
Location: Chicago
|
Oh, and Stack Overflow has had an answer for just about every basic Python question I've ever had (usually asked by someone else before I even got there), in case the official docs aren't enough.
|
quote |
Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
Thank you again for the help. I have written (and borrowed from Stack Overflow) some functions to do specific tasks I need. Now I'm stuck trying to figure out how to make them actually work together.
That is my biggest gripe with Codecademy, they taught me how to write functions which is great. How do I string them together to make a script that takes an input and reacts to that input though? One of my coworkers is going to help me with this tomorrow if my workload is low enough to allow it. Then I will have converted my first bush script to python. Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
So I have submitted my first script to code review for deployment!
It checks our servers for an IP being blocked in the firewall. While this may not seem like a big deal, with the number of customers we have, it is. I've just finished my second code to unblock an IP in our firewalls. I didn't get to submit it yet, but that's because I finished writing it tonight 2 minutes before heading home for the weekend. So I have a question: Is sh just an avenue to call sbin binaries? I was wanting to run bash CLI commands and discovered that you would use sh differently. Example: Code:
sudo apf -u 192.168.1.2 would be writtenCode:
if stuff:
with sh.sudo:
sh.apf(u='192.168.1.2') Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why the pointers are still 4 bytes on the Core 2 Duo iMac? | BlueApple | Apple Products | 12 | 2006-10-14 13:17 |
Need some massive help in Python... | RowdyScot | Programmer's Nook | 4 | 2006-10-10 00:51 |
apple Rookie needs pointers for buying 2nd-hand imac g4. | tommytahoe | Purchasing Advice | 1 | 2006-02-11 20:33 |
Python in Xcode | Oskar | Programmer's Nook | 7 | 2006-02-04 16:23 |
Python vs Alligator | Matsu | AppleOutsider | 3 | 2005-10-06 22:10 |