Programming Languages

Get Started: Eclipse and Python with PyDev in Developer Toolset 4.0

Get Started: Eclipse and Python with PyDev in Developer Toolset 4.0

Python logo

 

eclipse-426x100

Starting from Developer Toolset 4.0 we have added the Eclipse PyDev tooling for writing and debugging Python applications. This article aims to give new users a whirlwind tour of some of the key features.

Installing and Configuring

PyDev is installed by default when you install the IDE component of DTS 4.0:

$ sudo yum install devtoolset-4-ide

Once you’ve launched Eclipse, the first thing you need to do is configure an interpreter to use. Open the preferences dialog by choosing “Preferences” from the “Window” menu, then navigate to the “PyDev -> Interpreters -> Python Interpreter” preference node. Simply hit the “Quick Auto-Config” button to automatically discover and configure the first Python interpreter that is encountered in your PATH.

Interpreter Preferences

It’s worth knowing that not only does PyDev work well with the default version of Python that ships with RHEL, it also works with the Python Software Collections. For example, if you’d like to work with Python 3 then you can also install the rh-python34 software collection:

$ sudo yum install rh-python3

Continue reading “Get Started: Eclipse and Python with PyDev in Developer Toolset 4.0”

Share

Red Hat and Microsoft making .NET on Linux work for Enterprises

Today is a pretty exciting day if you’re an enterprise developer. . . Red Hat and Microsoft have announced that the two companies will be working together to bring a supported version of the .NET runtime to Red Hat’s Enterprise Linux and OpenShift 3. This offers developers more freedom and choice in how they develop their applications. Having spent a big part of my career at Microsoft and working with .NET since its inception, I’ve grown to love the strengths of the platform. But one of its main weaknesses has always been its portability beyond Windows. Now, that’s changing.

Continue reading “Red Hat and Microsoft making .NET on Linux work for Enterprises”

Share

What Lies Beneath: A tour of the dark gritty underbelly of OpenJDK

java icon 240 × 171OpenJDK is the premier open source Java implementation. The OpenJDK project provides the code used to build Red Hat’s Java releases for Fedora and RHEL and the Java releases used on most other Linux distributions. It also forms the basis of Oracle’s proprietary Java binary releases.

The Red Hat OpenJDK team has been working for some time now, along with organizations like the London Java Community (LJC) and some of our academic partners (e.g. Glasgow & Manchester) to encourage researchers and developers to dive into the innards of OpenJDK’s Java Virtual Machine (JVM) and see how it actually works. One reason is the entirely selfish one that we would like to enlarge the community of potential contributors to the OpenJDK project. Another is that we think it is no bad thing for Java developers, as indeed for any developers, to understand the tools they are using at a deeper level and appreciate how a well designed tool shields them from having to manage some of the more complex aspects of the runtime environment in which their programs execute.

Continue reading “What Lies Beneath: A tour of the dark gritty underbelly of OpenJDK”

Share

Type safe SalesForce Queries (SOQL) in Scala

ScalaThis blog shows how to implement a relatively simple type safe DSL for the SalesForce Object Query Language (SOQL). SalesForce doesn’t provide much tooling specifically for the Scala world, which got me to writing some support myself.
One of the most common ways to interact with the SalesForce API is using the Enterprise or the Partner WSDL. For the purpose of this article, I will be using the Enterprise WSDL. The main difference is that the Enterprise one is type-safe – it contains object definitions for all your data model objects, while the Partner one is more suitable for dynamically typed languages.

Custom DSL in Scala

Given that we have a type safe WSDL, how do we get to a type safe Scala DSL? Let me first show an example of what the goal is.

Continue reading “Type safe SalesForce Queries (SOQL) in Scala”

Share

.Net gets open sourced

Compass-Rose-BWThere was a time, not so long ago, when enterprise software development was pretty straight forward. For most, there were few choices – Java or .Net, Linux or Windows, a handful of databases and IT ran everything. Today, it’s anything but straight forward. There are dozens of languages, dozens of ways to host and deliver your applications, different client technologies, some proprietary and some not… there are a lot of decisions to make.

When there were limited choices, developers usually chose one camp or the other and called it a day.  But now, many of us are giving up those allegiances and embracing the new world of software development which is multi-platform, multi-lingual and multi-form factor. Microsoft, which has always been a “all in” decision, is now suddenly not, and  is offering a new option for developers.

Continue reading “.Net gets open sourced”

Share
Why Python 4.0 won’t be like Python 3.0

Why Python 4.0 won’t be like Python 3.0

Newcomers to python-ideas occasionally make reference to the idea of “Python 4000” when proposing backwards incompatible changes that don’t offer a clear migration path from currently legal Python 3 code. After all, we allowed that kind of change for Python 3.0, so why wouldn’t we allow it for Python 4.0?

Python logoI’ve heard that question enough times now (including the more concerned phrasing “You made a big backwards compatibility break once, how do I know you won’t do it again?”), that I figured I’d record my answer here, so I’d be able to refer people back to it in the future.

What are the current expectations for Python 4.0?

Continue reading “Why Python 4.0 won’t be like Python 3.0”

Share
The transition to multilingual programming with Python

The transition to multilingual programming with Python

A recent thread on python-dev prompted me to summarise the current state of the ongoing industry-wide transition from bilingual to multilingual programming as it relates to Python’s cross-platform support. It also relates to the reasons why Python 3 turned out to be more disruptive than the core development team initially expected.Python logo

A good starting point for anyone interested in exploring this topic further is the “Origin and development” section of the Wikipedia article on Unicode, but I’ll hit the key points below.

Continue reading “The transition to multilingual programming with Python”

Share

Dude, where’s my PaaS memory? Tuning Java’s footprint in OpenShift (Part 2)

Continued from part 1.

The test web service

The test web service implements a simple file cache storing up to 10 copies of any given named file. Uploading copies beyond the 10th one causes the oldest version to be discarded. The server supports a variety of requests allowing

  • a new version of a file to be uploaded
  • an existing file version to be downloaded
  • listing of the name and version counts of all files in the cache
  • deletion of all copies of a named file
  • deletion of the whole cache

Continue reading “Dude, where’s my PaaS memory? Tuning Java’s footprint in OpenShift (Part 2)”

Share

Dude, where's my PaaS memory? Tuning Java's footprint in OpenShift (Part 1)

Is Java really greedy for memory?

Java is often blamed for being an over-hungry consumer of physical memory. Indeed, until recently our OpenShift team were tempted to draw this same conclusion. OpenShift is Red Hat’s open source Platform as a Service (PaaS) product. You can access it via public Cloud infrastructure managed by Red Hat (OpenShift Online) or even deploy it to your own data centre/private cloud (OpenShift Enterprise). OpenShift Online provides simple and manageable scalability to anyone developing and deploying web services. One of the OpenShift team’s goals is to maximize the number of guest Java EE deployments on any underlying physical host. However, in the first release of OpenShift meeting this goal was challenged by the high physical memory use observed in many of the deployed JVMs. With only so much memory available on any given physical host the more memory each JVM uses the lower the density of guest deployments.

Continue reading “Dude, where's my PaaS memory? Tuning Java's footprint in OpenShift (Part 1)”

Share