Your search did not yield any results.
Course Directory [training on all levels]
- .NET Classes
- Agile/Scrum Classes
- Ajax Classes
- Android and iPhone Programming Classes
- Blaze Advisor Classes
- C Programming Classes
- C# Programming Classes
- C++ Programming Classes
- Cisco Classes
- Cloud Classes
- CompTIA Classes
- Crystal Reports Classes
- Design Patterns Classes
- DevOps Classes
- Foundations of Web Design & Web Authoring Classes
- Git, Jira, Wicket, Gradle, Tableau Classes
- IBM Classes
- Java Programming Classes
- JBoss Administration Classes
- JUnit, TDD, CPTC, Web Penetration Classes
- Linux Unix Classes
- Machine Learning Classes
- Microsoft Classes
- Microsoft Development Classes
- Microsoft SQL Server Classes
- Microsoft Team Foundation Server Classes
- Microsoft Windows Server Classes
- Oracle, MySQL, Cassandra, Hadoop Database Classes
- Perl Programming Classes
- Python Programming Classes
- Ruby Programming Classes
- Security Classes
- SharePoint Classes
- SOA Classes
- Tcl, Awk, Bash, Shell Classes
- UML Classes
- VMWare Classes
- Web Development Classes
- Web Services Classes
- Weblogic Administration Classes
- XML Classes
- Introduction to C++ for Absolute Beginners
14 October, 2024 - 15 October, 2024 - RHCSA EXAM PREP
9 September, 2024 - 13 September, 2024 - Ruby on Rails
22 August, 2024 - 23 August, 2024 - RED HAT ENTERPRISE LINUX V7 DIFFERENCES
8 July, 2024 - 10 July, 2024 - Linux Fundaments GL120
15 July, 2024 - 19 July, 2024 - See our complete public course listing
Blog Entries publications that: entertain, make you think, offer insight
Python and Ruby, each with roots going back into the 1990s, are two of the most popular interpreted programming languages today. Ruby is most widely known as the language in which the ubiquitous Ruby on Rails web application framework is written, but it also has legions of fans that use it for things that have nothing to do with the web. Python is a big hit in the numerical and scientific computing communities at the present time, rapidly displacing such longtime stalwarts as R when it comes to these applications. It too, however, is also put to a myriad of other uses, and the two languages probably vie for the title when it comes to how flexible their users find them.
A Matter of Personality...
That isn't to say that there aren't some major, immediately noticeable, differences between the two programming tongues. Ruby is famous for its flexibility and eagerness to please; it is seen by many as a cleaned-up continuation of Perl's "Do What I Mean" philosophy, whereby the interpreter does its best to figure out the meaning of evening non-canonical syntactic constructs. In fact, the language's creator, Yukihiro Matsumoto, chose his brainchild's name in homage to that earlier language's gemstone-inspired moniker.
Python, on the other hand, takes a very different tact. In a famous Python Enhancement Proposal called "The Zen of Python," longtime Pythonista Tim Peters declared it to be preferable that there should only be a single obvious way to do anything. Python enthusiasts and programmers, then, generally prize unanimity of style over syntactic flexibility compared to those who choose Ruby, and this shows in the code they create. Even Python's whitespace-sensitive parsing has a feel of lending clarity through syntactical enforcement that is very much at odds with the much fuzzier style of typical Ruby code.
For example, Python's much-admired list comprehension feature serves as the most obvious way to build up certain kinds of lists according to initial conditions:
a = [x**3 for x in range(10,20)]
b = [y for y in a if y % 2 == 0]
first builds up a list of the cubes of all of the numbers between 10 and 19 (yes, 19), assigning the result to 'a'. A second list of those elements in 'a' which are even is then stored in 'b'. One natural way to do this in Ruby is probably:
a = (10..19).map {|x| x ** 3}
b = a.select {|y| y.even?}
but there are a number of obvious alternatives, such as:
a = (10..19).collect do |x|
x ** 3
end
b = a.find_all do |y|
y % 2 == 0
end
It tends to be a little easier to come up with equally viable, but syntactically distinct, solutions in Ruby compared to Python, even for relatively simple tasks like the above. That is not to say that Ruby is a messy language, either; it is merely that it is somewhat freer and more forgiving than Python is, and many consider Python's relative purity in this regard a real advantage when it comes to writing clear, easily understandable code.
And Somewhat One of Performance
In this tutorial we are going to take a look at how you work with strings in Python. Now, any language worth its salt will have a number of options for working with text and Python is probably one of the best to use when it comes to processing text.
If you are new to programming in general you may be wondering what a string is. In terms of programming, a string is classed as any sequence of characters you can type with your keyboard, and let’s face it, if you want your application to be of any use to yourself or other users then you need it to tell you what it’s doing or to prompt you for an action, and that is where strings come into play.
They are your applications way of communicating with the user. Without the ability to enter and display text or software would be pretty useless.
So, how would you create a string in Python? Take a look at the following code:
This section of our beginning python training class always stumps students. Firstly, because they need to know the difference between a function and a method. Secondly, they need to understand object oriented programming concepts. Thirdly, they need to realize that python has three types of methods. Then they need to know how to use each method, which means they need to know the purpose of each method type. Then they have to understand mutable versus non-mutable types. The list goes on. As part of our python tutorial, I hope to shed some light on this confusing topic.
To begin, the difference between a function and a method in python is that a method is defined within a class. Here is an illustration:
#function def greeting(): print "Hello, I hope you're having a great day!" class HSGPrinter(object): #method def greeting(self): print "Hello, I hope you're having a great day!"
As should be obvious, the second definition of greeting is encapsulated within the HSGPrinter class and is , therefore, refered to as a method.
The astute reader will notice that the greeting method contains one parameter named self. For those who know C++ , Java or C#, self is equivalent to this i.e. it is a reference to the invoking object:
I suspect that many of you are familiar with the term "hard coding a value" whereby the age of an individual or their location is written into the condition (or action) of a business rule (in this case) as shown below:
if customer.age > 21 and customer.city == 'denver'
then ...
Such coding practices are perfectly expectable provided that the conditional values, age and city, never change. They become entirely unacceptable if a need for different values could be anticipated. A classic example of where this practice occurred that caused considerable heartache in the IT industry was the Y2K issue where dates were updated using only the last 2 digits of a four digit number because the first 2 digits were hard-coded to 19 i.e. 1998, 1999. All was well provided that the date did not advance to a time beyond the 1900’s since no one could be certain of what would happen when the millennia arrived (2000). A considerably amount of work (albeit boring) and money, approximately $200 billion, went into revising systems by way of software rewrites and computer chip replacements in order to thwart any detrimental outcomes. It is obvious how a simple change or an assumption can have sweeping consequences.
You may wonder what Y2K has to do with Business Rule Management Systems (BRMS). Well, what if we considered rules themselves to be hard-coded. If we were to write 100s of rules in Java, .NET or whatever language that only worked for a given scenario or assumption, would that not constitute hard-coded logic? By hard-coded, we obviously mean compiled. For example, if a credit card company has a variety of bonus campaigns, each with their own unique list of rules that may change within a week’s time, what would be the most effective way of writing software to deal with these responsibilities?
training details locations, tags and why hsg
The Hartmann Software Group understands these issues and addresses them and others during any training engagement. Although no IT educational institution can guarantee career or application development success, HSG can get you closer to your goals at a far faster rate than self paced learning and, arguably, than the competition. Here are the reasons why we are so successful at teaching:
- Learn from the experts.
- We have provided software development and other IT related training to many major corporations since 2002.
- Our educators have years of consulting and training experience; moreover, we require each trainer to have cross-discipline expertise i.e. be Java and .NET experts so that you get a broad understanding of how industry wide experts work and think.
- Discover tips and tricks about programming
- Get your questions answered by easy to follow, organized experts
- Get up to speed with vital programming tools
- Save on travel expenses by learning right from your desk or home office. Enroll in an online instructor led class. Nearly all of our classes are offered in this way.
- Prepare to hit the ground running for a new job or a new position
- See the big picture and have the instructor fill in the gaps
- We teach with sophisticated learning tools and provide excellent supporting course material
- Books and course material are provided in advance
- Get a book of your choice from the HSG Store as a gift from us when you register for a class
- Gain a lot of practical skills in a short amount of time
- We teach what we know…software
- We care…