Martin Odersky talk at OSCON Java 2011, "Working Hard to Keep It Simple". A nice comparison between imperative and functional programming paradigm, and a very fast introduction to Scala. Even if a bit dated, still very interesting.
tutorial-like examples and some informal chatting on Java, JavaScript, other programming languages, and more.
Learning Apache Maven 3
I have just finished watching to this Pack video course about Maven, on youtube there is a preview that shows what you can expect from it.
It is designed to follow a Java programmer who knows nothing about Maven from the absolute beginning to writing a multi module project.
The major emphasis is on Maven for Windows plus Eclipse, just at the beginning it is shown how to install Maven on Linux and Mac, and how to integrate it also in Intellij and NetBeans. This is not a big issue, since we are in the Java world, and the platform differences are usually not too harsh.
The course is structured in four parts. After the installation/integration done in the introduction, we are guided to write a first "hello world" application. The third block is about creating a Web App by Maven that uses features from Struts2, Hibernate, and Spring. The last part shows how to develop a client/sever multi module project.
I found the standard price for this course a bit excessive, but in this bargains season, at less than five bucks, I wouldn't see how to complain.
It works fine as an introduction to the matter, in a couple of hours you can't expect to become a Maven master, but I'd say it succeeds in giving a good overview.
It has a few weak spots, too. Mainly, the audio comment is not lively at all, and there is a curious alternation in voices that I found distracting. Hear this, for instance, at around 1.30:
It is designed to follow a Java programmer who knows nothing about Maven from the absolute beginning to writing a multi module project.
The major emphasis is on Maven for Windows plus Eclipse, just at the beginning it is shown how to install Maven on Linux and Mac, and how to integrate it also in Intellij and NetBeans. This is not a big issue, since we are in the Java world, and the platform differences are usually not too harsh.
The course is structured in four parts. After the installation/integration done in the introduction, we are guided to write a first "hello world" application. The third block is about creating a Web App by Maven that uses features from Struts2, Hibernate, and Spring. The last part shows how to develop a client/sever multi module project.
I found the standard price for this course a bit excessive, but in this bargains season, at less than five bucks, I wouldn't see how to complain.
It works fine as an introduction to the matter, in a couple of hours you can't expect to become a Maven master, but I'd say it succeeds in giving a good overview.
It has a few weak spots, too. Mainly, the audio comment is not lively at all, and there is a curious alternation in voices that I found distracting. Hear this, for instance, at around 1.30:
Maven 3 video course
I have got a pointer to this video course on Apache Maven 3, you could also find a preview on YouTube that gives the gist of it.
It is a couple of hours long, it looks to be designed as an introduction to Maven for a Java developer who has no (or little) previous knowledge of it.
Since I use Maven in an unstructured way, it would probably good for me to find the way to spend time watching it. I plan to do it in the near future, and writing something more about it.
It is a couple of hours long, it looks to be designed as an introduction to Maven for a Java developer who has no (or little) previous knowledge of it.
Since I use Maven in an unstructured way, it would probably good for me to find the way to spend time watching it. I plan to do it in the near future, and writing something more about it.
Hello Android Studio
I have installed Android Studio, and I have made a Nexus 7 ready to be used as target device. Now I am ready to develop a first "Hello world" application.
Android Studio make it very easy.
Just select New Project from the file menu (or from the welcome dialog) and specified which properties you want to change from the default schema. I modified just three of them:
After confirming on Nexus that I wanted to debug that app, I saw it appearing. It doesn't say much. It just have the "Hello Android" name on the title bar and, wait a moment, an "Hello world!" message below it? Where does it come from?
We should remember that among the properties we were asked to confirm to create a new project, there was also something about the layout to be used by the application. Let's check it.
I opened the Project View, I clicked on my HelloAndroid project, src, main, res, layout, and I finally see it, activity_main.xml.
In it I see that the TextView property is filled with an @string/hello_world. So I opened the res, values, strings.xml, and I saw that a hello_world string resource was set for me to the value "Hello world!"
I don't want any message on my app, so I cut that line, went back to activity_main.xml, and remove from the "text" property the reference to that string. Re-launching HelloAndroid I can now enjoy its beautiful emptiness.
Android Studio make it very easy.
Just select New Project from the file menu (or from the welcome dialog) and specified which properties you want to change from the default schema. I modified just three of them:
- Application name: Hello Android - Module name: HelloAndroid - Package name: dd.HelloAndroidThen was just a matter of compiling and, after ensuring the target device was connected and available to my developer unit, ran it.
After confirming on Nexus that I wanted to debug that app, I saw it appearing. It doesn't say much. It just have the "Hello Android" name on the title bar and, wait a moment, an "Hello world!" message below it? Where does it come from?
We should remember that among the properties we were asked to confirm to create a new project, there was also something about the layout to be used by the application. Let's check it.
I opened the Project View, I clicked on my HelloAndroid project, src, main, res, layout, and I finally see it, activity_main.xml.
In it I see that the TextView property is filled with an @string/hello_world. So I opened the res, values, strings.xml, and I saw that a hello_world string resource was set for me to the value "Hello world!"
I don't want any message on my app, so I cut that line, went back to activity_main.xml, and remove from the "text" property the reference to that string. Re-launching HelloAndroid I can now enjoy its beautiful emptiness.
Setting up Nexus 7
I have downloaded and set Android Studio up, now I have to decide against which target I want to run the applications that I develop. Actually, we are not forced to use a real device, we could also using an emulation. Still, having at hand a Nexus seven, it looks kind of a good idea to use it.
To be allowed to use Nexus 7 as a developer tool, you need to activate the developer options.
In the settings page, look in the system section, and click on the "about tablet" item.
Tap seven times (I'm not kidding) on "build number" and ... now you are a developer!
That means that when you go back to settings page, you can see in the system section he Developer options. Click on that item, you enter the Developer options page, where you find, in the Debugging section, the USB debugging option, that you should activate.
Now, if you run the command
Back to Android Studio, once you are in a project, you can open the Run menu, where you'll see the Edit Configuration... item, clicking on which, you will also be able to determine the target device. You can choose an Emulation (you have to specify which device you want to emulate) or you can specify that you want to use an USB device.
To be allowed to use Nexus 7 as a developer tool, you need to activate the developer options.
In the settings page, look in the system section, and click on the "about tablet" item.
Tap seven times (I'm not kidding) on "build number" and ... now you are a developer!
That means that when you go back to settings page, you can see in the system section he Developer options. Click on that item, you enter the Developer options page, where you find, in the Debugging section, the USB debugging option, that you should activate.
Now, if you run the command
adb devicesYou should see that "something" is available.
Back to Android Studio, once you are in a project, you can open the Run menu, where you'll see the Edit Configuration... item, clicking on which, you will also be able to determine the target device. You can choose an Emulation (you have to specify which device you want to emulate) or you can specify that you want to use an USB device.
Setting up Android Studio
Android Studio is the Google IDE for Android based on Intellij IDEA announced at 2013 Google I/O. Currently is available in an early access preview that, even if not completely stable, is worth a try.
Here I report what I have done to install it on a Linux Debian-based (actually Ubuntu) box, then I'll write about how I developed a first "Hello world" application.
Download
On android.com, I went to the Android Studio page. There I found links to specific Android Studio bundles for three different platforms, Windows, Mac OS X, Linux. I clicked on the Linux one, and I patiently waited the 400 Meg package to be downloaded on my machine. At the time I have written this post, the current version was 0.2.2.
Install
The bundle was actually a compressed tarball, named "android-studio-bundle-130.737825-linux.tgz". I moved it to someplace looked right to me, and expanded it by a call to tar xvfz. Anything was put in the folder android-studio. Under its bin directory there is a shell script, studio.sh, that we need to call to run the IDE.
Theoretically speaking, that's it.
Still, I have experience a couple of issues. The minor one was solved installing Gradle "by hand", getting it from the official gradle.org download page. The other came from adb, the Android Debug Bridge, that had a couple of dependencies not resolved at runtime. It logged that the problem was about curses, but when I ran ldd on it, I saw that where reported as not found both libncurses.so.5 and libstdc++.so.6. In my case this was due to the fact that I am on a 64 bit system, while adb is a 32 bit application. This was the solution:
Here I report what I have done to install it on a Linux Debian-based (actually Ubuntu) box, then I'll write about how I developed a first "Hello world" application.
Download
On android.com, I went to the Android Studio page. There I found links to specific Android Studio bundles for three different platforms, Windows, Mac OS X, Linux. I clicked on the Linux one, and I patiently waited the 400 Meg package to be downloaded on my machine. At the time I have written this post, the current version was 0.2.2.
Install
The bundle was actually a compressed tarball, named "android-studio-bundle-130.737825-linux.tgz". I moved it to someplace looked right to me, and expanded it by a call to tar xvfz. Anything was put in the folder android-studio. Under its bin directory there is a shell script, studio.sh, that we need to call to run the IDE.
Theoretically speaking, that's it.
Still, I have experience a couple of issues. The minor one was solved installing Gradle "by hand", getting it from the official gradle.org download page. The other came from adb, the Android Debug Bridge, that had a couple of dependencies not resolved at runtime. It logged that the problem was about curses, but when I ran ldd on it, I saw that where reported as not found both libncurses.so.5 and libstdc++.so.6. In my case this was due to the fact that I am on a 64 bit system, while adb is a 32 bit application. This was the solution:
sudo apt-get install lib32ncurses5 lib32stdc++6
Introduction to ActiveMQ
Sort of mouthful of a title for this book, Instant Apache ActiveMQ messaging application development how-to, but don't let this taking you aback. It is a slim (sixty-sh pages) tutorial on ActiveMQ written by Timothy Bish, who actually is an active contributor to that Apache project.
You can't expect it to go too deep in the matter, after all it's in a series that has as headline "Learn in an instant, short, fast, focused", still it I think it is good as a first tutorial. It refers ActiveMQ version 5.8 (the latest release, currently), and it is thought for a Java developer who needs to get introduced to this message broker. You'd better to have some experience on Java, but you'd probably get the most of it even if you don't know much about MOM (Message-Oriented Middleware) and in particular about JMS, the Java EE messaging standard defined by the JSR 914 specification and implemented by ActiveMQ.
After installing ActiveMQ and setting up a working environment (no IDE is used, we are showed instead how to do it "by hand", via Maven), it is showed how to create a first simple application that sends and receive a message. Then we are introduced to JMS queues, topics, selectors. All this stuff is marked as "simple", and it is followed by a chapter where we are introduced to the request-response pattern (the only part of the book that is considered "intermediate").
The third part of the book consists in half a dozen "advanced" chapters where we can read about scheduling, monitoring, testing, pooling connections, using virtual destinations and failover transport.
Lot of examples help to make clearer the concepts explained by Bish in a plain and readable prose. There is no room to enter in much details, still many "There's more" sections offer pointers to find more information in the net.
You can't expect it to go too deep in the matter, after all it's in a series that has as headline "Learn in an instant, short, fast, focused", still it I think it is good as a first tutorial. It refers ActiveMQ version 5.8 (the latest release, currently), and it is thought for a Java developer who needs to get introduced to this message broker. You'd better to have some experience on Java, but you'd probably get the most of it even if you don't know much about MOM (Message-Oriented Middleware) and in particular about JMS, the Java EE messaging standard defined by the JSR 914 specification and implemented by ActiveMQ.
After installing ActiveMQ and setting up a working environment (no IDE is used, we are showed instead how to do it "by hand", via Maven), it is showed how to create a first simple application that sends and receive a message. Then we are introduced to JMS queues, topics, selectors. All this stuff is marked as "simple", and it is followed by a chapter where we are introduced to the request-response pattern (the only part of the book that is considered "intermediate").
The third part of the book consists in half a dozen "advanced" chapters where we can read about scheduling, monitoring, testing, pooling connections, using virtual destinations and failover transport.
Lot of examples help to make clearer the concepts explained by Bish in a plain and readable prose. There is no room to enter in much details, still many "There's more" sections offer pointers to find more information in the net.
Subscribe to:
Posts (Atom)