Thursday Dec 11, 2014

YouTube: How to Find the Source of Icons from NetBeans IDE

When you're creating plugins for NetBeans and you want to reuse an icon that you see in NetBeans, what do you do to find that icon in the NetBeans sources? Tackling this challenge is described in this short YouTube clip:

Wednesday Dec 10, 2014

Python in NetBeans IDE 8.0.2

Let's get started with Python in NetBeans IDE 8.0.2.

Take the following steps:

  1. Prepare. Watch this YouTube movie:


  2. Make Sure You're Prepared. Watch the movie again. It takes less than 5 minutes.

  3. Get the Correct Version of NetBeans IDE. Download NetBeans IDE 8.0.2, the "Java SE" distribution, which is the one where I've tried the scenario below. You're free to choose any other distribution, I'd recommend never using "All" except if you really need to do Java ME and C/C++ development, for pretty much all other scenarios, one of the other distributions is much better, i.e., smaller, faster. However, do make sure that you only continue with the next step if you have NetBeans IDE 8.0.2 installed. Note that there is a "2" in the previous sentence, i.e., it is not enough to have NetBeans IDE 8.0, nor to have NetBeans IDE 8.0.1. Instead, dowload and install NetBeans IDE 8.0.2.

  4. Get the Python Plugin for NetBeans IDE 8.0.2. Go here, click Download on the page, and then unzip the file that you have downloaded: http://plugins.netbeans.org/plugin/56795

  5. Go to the Plugin Manager in NetBeans IDE. In NetBeans IDE, go to Tools | Plugins. Click the "Downloaded" tab, which you see below. Click Add Plugins and browse to the folder where you unzipped the files in the previous step. Select them all. You now should see exactly this:



  6. Install the Python Plugin. Click Install. Click Next. Put a checkmark in "I accept the terms in all of the license agreements." Click Install. Click Continue. Click Finish. Click Close.

  7. Go to the New Project Dialog. Go to File | New Project or press Ctrl-Shift-N. You should now see this:



  8. Get Started Creating a Python Application. Click Next. If you have Python installed correctly on your system, you'll see the installations available (look in the "Python Platform" drop-down below), possibly after a moment while NetBeans searches for your installations:



  9. Step Through the Wizard. Pick the Python Platform of your choice, provide a name (e.g., "HelloPythonWorld") and a location to store the application, in the step above, and click Finish.

  10. Run the Python Application. The application opens, click the green Run arrow in the toolbar or right-click the application and choose Run. You now should see this:

Right now, the main missing feature is the set of well established smart editor features in NetBeans IDE, such as code completion, i.e., when you press Ctrl-Space, nothing happens. No error checking, i.e., no parsing is done, either. These are things being worked on right now. However, you can code and run and debug your Python applications, which is a lot more than nothing.

Feedback welcome, especially if you're planning to contribute code to this project.

Tuesday Dec 09, 2014

Trip Report: DevFest Istanbul 2014

I had a fantastic time at DevFest Istanbul, Turkey, on Saturday 6 December. It was the first time I was in Turkey. However, over several months, even before knowing I'd be going to this conference, I'd been following a free on-line Yale course on medieval history and then, hey, there I was in Constantinople. Fortunately, Mark Stephens, from NetBeans partner IDRsolutions, and one of the new NetBeans Dream Team members, turns out to have studied medieval history for many years, so turned out to be a perfect tour guide, when we went with a small group to many historical sites, such as the Hagia Sophia.

The conference itself was excellent. Three thousand turned up, to the free conference, which is about twice as many as last year. Mark Stephens did a great session entitled "5 Reasons Why NetBeans Should Be In Every Developer's Toolkit" and I followed with a packed out room, i.e., 800 at least, since many were standing at the doors, "Coding for Desktop and Mobile with HTML5 and Java EE 7", which showed many features in NetBeans, such as the HTML5 tools, Chrome integration, AngularJS features, and Java EE code generators.

Also on the agenda were sessions by PrimeFaces and Vaadin, while Martijn Verburg, London JUG lead, Java champion, etc etc, and one of the new NetBeans Dream Team members did his "The Habits of Highly Effective Teams". But there was much more, in four tracks, most of which I missed because I was at the NetBeans booth answering heaps of questions about NetBeans. We also worked on the next NetBeans community podcast, which will again feature interviews done by NetBeans users with each other, all recorded during the conference.

Another highlight was that Dorine Flies from "Encouraging Programming in Kids" (together with Luke Mayell and others) did another Minecraft hacking session with kids and their parents. Of course, they started by setting up NetBeans and the JDK, after which they ran Minecraft from NetBeans and then hacked it.

It was great seeing heaps of little kids with NetBeans on their laptops!

And I'll be working a bit more on the NetBeans shisha integration soon, in gratitude to all the nargile I consumed.

All in all, a great few days, thanks everyone for making it possible, for being so enthusiastic, and I hope I'll be there again next year!

Monday Dec 08, 2014

ERP System for the Printing Industry on the NetBeans Platform

One of the organizations present at NetBeans Day Germany last week was SSB Software Service und Beratung GmbH, based in Munich, a software company with more than 20 years of experience focused on integrated solutions for the printing industry.

Diso21 Client is a NetBeans Plattform application created by SSB to provide an ERP system for modern printing companies. It helps to manage and to automate enterprise processes. The application has a modular architecture and allows for a flexible arrangement of workplaces. The Diso21 Client has an integration API to embed third party systems to increase productivity.

Here's a screenshot, click to enlarge it:


It will be added to the NetBeans Platform Showcase soon.

Friday Dec 05, 2014

AsciidoctorJ and NetBeans IDE

AsciidoctorJ is the official library for running Asciidoctor on the JVM.

Here's the start of support for AsciidoctorJ in NetBeans IDE. New AsciiDoc files can be created and you have a source editor where you can write AsciiDoc. Currently, no syntax coloring, etc, yet.

When you click the Visual togglebutton above, AsciidoctorJ is used to convert the AsciiDoc:


Right now, the conversion options are hardcoded, using CodeRay, a Ruby library for syntax highlighting. Thanks to AsciidoctorJ, no Ruby needs to be installed, since AsciidoctorJ wraps the gems. Notice the code below, which was as much fun to figure out as something really not fun and could still be wrong and looks problematic. But it works.

Asciidoctor doctor = Asciidoctor.Factory.create(Arrays.asList(
        "gems/asciidoctor-1.5.0/lib",
        "gems/coderay-1.1.0/lib",
        "META-INF/jruby.home/lib/ruby/1.8"));
String html = doctor.convert(obj.getPrimaryFile().asText(), getInitialOptions());
htmlEditorPane.setText(html);

Need to integrate the Progress API into the above so that the progress bar runs while the conversion is taking place.

The source code of the above is here, looking forward to clones and pull requests:

https://github.com/GeertjanWielenga/AsciidoctorJ4NB

Thursday Dec 04, 2014

New NetBeans Power Tools: Key Promoter & Quick Member Search

Today I have two new/updated plugins for the price of one! One costs zero money and therefore two do, too.

Firstly, I find the concept of a key promoter very handy, but the initial version of the plugin provided too much noise. Now, instead of using the Notifications window, the keyboard shortcut, if there is one, that matches the action invoked from a menu item or toolbar button is shown in the status bar:

Get the above plugin here.

Secondly, I'm going to be using only the keyboard (and not the mouse) as much as possible and "Distraction Free Mode" as much as possible, from now onwards. That means I want the tools I need to use to be close at hand. Therefore, rather than all the clicking I need to do to undock the Navigator, bring it to where I want it to be, etc etc, I've created a new plugin that lets you press Alt-Q (the "q" is the "Q" in "Quick Member Search"), at which point the Navigator will undock itself and appear as a small dialog in the editor. Especially powerful when you're already in "Distraction Free Mode" (Ctrl-Shift-Enter).

The Navigator that you see above appeared in the editor when I pressed Alt-Q. I did not need to (1) open the Navigator via Ctrl-7 or a menu item in the Window menu and then (2) move my mouse to the Navigator in its docked position in the lower left and then (3) right-click in the tab of the Navigator with my mouse and then (4) choose Float in the popup menu with my mouse and then (5) drag the Navigator with my mouse into the editor. No, instead of all that, I simply pressed Alt-Q and automatically the Navigator was put where I wanted it.

Get the above plugin here.

Anyone have requests for other small and handy power tools for NetBeans IDE? Let me know, especially if you're interested in working on them together with me.

Wednesday Dec 03, 2014

Trip Report: NetBeans Day Germany 2014

NetBeans Day in Munich, Germany, held yesterday, was pretty amazing. Despite having been arranged at the last minute, and undermined a bit by Lufthansa strikes and Deutsche Bahn hiccups, the room was filled to almost maximum capacity, certainly around 100 attendees were present. (Registration for the event had to close soon after it opened, because there was only room for 100.) The key people to thank for the event are Peter Doschkinow from the Oracle office in Munich and Toni Epple from Eppleton. They set up the whole day, invited speakers, and so on. Oracle hosted the event, provided coffee and lunch, and the room itself was really nice.

Aside from the rockstar speaker line up, which included Adam Bien, Gerrit Grunwald, and Markus Eisele, quite some well known faces attended, such as Sven Reimers, Florian Vogler, and Martin Klähn, as well as uber NetBeans plugin developer Benno Markiewicz. And Reinhard Schmitz flew all the way from Luxembourg. I met Norman Fomferra and Marco Peters for the first time, who're working on a NetBeans Platform application for the European Space Agency, though there were so many people that I didn't get to talk to nearly all of them. Especially, I missed talking to guys who attended from ConSol, where NetBeans Platform work is also being done, while I learned about several NetBeans Platform applications that I'd never heard of before, such as at SSB and Transver, both organizations in Munich.

But, in fact, most of the day was focused on Java EE, and web development in general. Adam talked about Java EE in combination with AngularJS, Markus about WildFly and OpenShift, while I talked a bit about the Oracle Cloud and Oracle Developer Cloud Service, for both of which there are plugins in the NetBeans Plugin Manager. Peter Doschkinow talked on server-side JavaScript, Toni Epple on DukeScript, Sven Reimers on the NetBeans Platform, and Gerrit Grunwald started the day by talking (via Skype) about wearables and Java. I showed some interesting features in NetBeans IDE and talked a bit about the community around NetBeans.

09:00 - 09:10 Anton Epple, Geertjan Wielenga, Peter Doschkinow: "Welcome to NetBeans Day"
09:15 - 10:10 Gerrit Grunwald: "Catch me if you can" - Java on Wearables
10:15 - 11:10 Markus Eisele: "Manage JBoss EAP, WildFly and OpenShift with NetBeans"
11:15 - 12:15 Adam Bien: "The Microservice IDE: From Java EE To Angular"
12:15 - 13:15 Mittagspause & Open Space
13:15 - 14:10 Anton Epple: "Write Once Run Anywhere with DukeScript"
14:15 - 15:15 Peter Doschkinow: "Server-Side JavaScript on the JVM"
15:15 - 15:45 Kaffeepause
15:45 - 16:45 Geertjan Wielenga - "Heaps of Cool Hidden Goodies in NetBeans IDE"
16:50 - 17:50 Sven Reimers: "NetBeans Platform - Inifinite Evolution"
18:00 - 18:30 Geertjan Wielenga: "Manage Oracle Cloud, Oracle Developer Cloud Service, and WebLogic with NetBeans"

For me, the question of the day was asked during a break in the program by Stefan Gürtler from Transver who asked me: "How do you find your methods in NetBeans IDE?" (Somebody then said "if you need to look for your methods, your class is too large", which was an interesting assertion.) I mentioned the Navigator but he said he'd like to be able to pop up a small dialog, like in other IDEs, within the editor, and then quickly search for a method, at which point the list would filter down to the one he wants to work with. That sounds cool and here's the start of that:

The current implementation is that you start typing and immediately the filtering happens:

It's very simple so far, but the idea is you'll be able to press Alt-Q, do your search, find the member you need, click on it, and then the popup closes and the cursor is on the member in the editor. The plugin can be cloned and I'm looking forward to getting pull requests!

https://github.com/GeertjanWielenga/QuickMemberSearch

The plan is for multiple NetBeans Days to be held around the world. Now that we have a good location in Munich, we'll be able to hold more such events there. The next NetBeans Day is planned to be held during March or April next year. Probably it will be done quite differently to yesterday. For example, maybe there'll be multiple tracks and definitely there should be more time for talking and getting to know each other. Maybe small workshops on e.g., creating NetBeans plugins, could be good to include too.

Thanks to everyone who came, looking forward to next time!

Monday Dec 01, 2014

Top 7 Reasons to Consider Using NetBeans IDE

There are many reasons why it makes sense to use NetBeans IDE for your software development work. But, of those many reasons, what are the top reasons? Here they are, the top 7 reasons, explained together with demos and slides!

Go here for many more similar YouTube movies.

Friday Nov 28, 2014

Highly Personalized Pricing Structures

At Droidcon, beginning of this week, the main thing I learned was during a conversation in the hallway right at the end of the conference. According to the two guys I was talking with:

  • When you go to Booking.com, the price you're offered for your booking depends on whether you own an Android or an iPhone. This can be determined in dozens of different ways, e.g., the searches you do on-line. Apparently iPhone users are wealthier than Android users. Therefore, Booking.com offers a higher price to you if you're an iPhone user but, of course, you'll never know the difference because you're not shown the price offered to the Android user.

  • When you go to Amazon.com, the price you're offered for a product depends on whether you've searched for the same product on competing sites. I.e., if you've already searched for the book you're looking at on Amazon on some other book-related site, Amazon offers you a lower price, i.e., attempts to undersell the competition. But, of course, you'll never know that was the reason for the price of the book since you'll assume the price you're seeing is the same for everyone.

I'm sure they factor into the equation that the above perspectives aren't always correct. For example, an Android user might be wealthier than an iPhone user, but out of principles, e.g., related to open source for example, might base their decision on something other than wallet size, while simultaneously the iPhone user might be less wealthy while valuing the iPhone as a status symbol and might therefore pay more for a mobile device than wallet size would suggest. Etc.

Aside from the error factor at play, there's another way of looking at this scenario, assuming it is true—look at it as a progressive measure whereby the wealthy subsidize the purchases of those with thinner wallets. Again, though, factor in that not everyone fits the analysis and that you may not have been doing comparison-shopping when looking at competing sites for similar products.

And yet another way of looking at this is to see it as part of the larger trend of individualization, e.g., nowadays people don't watch TV but go to YouTube or other on-line channels for entertainment, choosing a highly individual entertainment track. However, here they have a choice. I don't like the idea of others choosing for me, e.g., deciding that I'm wealthier and thus offering me higher prices, without telling me about it.

Then again, all of this assumes that the two random guys in the hallway at Droidcon weren't talking rubbish. But, if it isn't happening already, it soon may be. Maybe a way around it all is to have different devices where you do different kinds of searches to confuse the analyzers. Or just go to the good 'ol travel agent and bookstore, instead of booking and buying on-line, if you can still find them, that is.

Thursday Nov 27, 2014

Red Hat OpenShift (Part 2)

After part 1, Cojan van Ballegooijen from Red Hat, with a little bit of input from my side, got quite a bit further with the Red Hat OpenShift plugin today. After selecting Red Hat OpenShift in the Cloud Provider dialog, shown below...

...the dialog below appears, i.e., when you click Next above. The UI you see below is 100% the same as the equivalent dialog in JBoss Developer Studio, with thanks to Cojan van Ballegooijen from Red Hat:

Right now, the Username and Password fields work as one would expect, while all the other UI components above aren't backed with business logic yet, i.e., those parts don't function at all yet and are just there as placeholders at the moment.

When Finish is clicked, the OpenShift Java Client (version 2.6.0) is used to make the connection. The result is shown below, i.e., all the domains (in this case, only one domain is assigned to the user) and all the applications within the domains (in this case, there's a single application within the domain) are shown in a hierarchy within the Cloud node in the Services window:

Plus, when you hover with your mouse over the application node, you see the related URL.

So, right now, the Red Hat OpenShift plugin lets you connect to OpenShift and display your domains and applications. That's all, though a promising stage to be at.

Something like this could be where we're heading:

The plugin is found, and under active development, here:

https://github.com/GeertjanWielenga/OpenShift4NetBeans

Wednesday Nov 26, 2014

NetBeans IDE Workshop at Hanze University of Applied Sciences

I had a great time at the Hanze University of Applied Sciences in Groningen today. In the bioinformatics department, NetBeans IDE is used to teach Java to third year students (who learn Python during their first year and R during their second year) and Michiel Noback (who I've known for about 3 years, since I delivered a NetBeans Platform course there at some stage), their Java teacher, invited me to do an "advanced NetBeans workshop".

The whole group, including some of the teachers, came to about 30. Many key things about NetBeans were covered, including its history and the many community activities going on in the open source work in and around NetBeans. And then we got down to some work in the IDE. Firstly, we looked at the HTML support, including the NetBeans Chrome Connector plugin. (Basically, we did most things from this YouTube movie.) After that, quite a bit of Java coding (including the handy Cheat Sheet plugin), with many tips and tricks, e.g., heaps of productivity tips, about keyboard shortcuts, code templates, code generators, settings in the Options window, etc. The students were split into groups and had to choose their favorite code templates and then we discussed them and where they could be useful. The Dark Look And Feel Themes plugin (in the Plugin Manager) was very popular, as well as netbeansthemes.com and svenspruijt.nl/themebuilder. Within no time at all, many of the students had set up a customized Sublime-like appearance in the IDE. And, right at the end, in the last hour, we looked at the NetBeans Debugger and there were some small tasks that the students worked on in groups. Conditional breakpoints and dependent breakpoints were examined, while I demonstrated the Beep plugin that adds custom sounds to breakpoints.

A pretty good and intense (from 12.30 to 17.00 with a couple of break in between) session.



Michiel Noback had a fantastic feature request that I started and finished on the train home and am blogging about now in the train: the possibility of setting runtime properties in Ant-based projects without needing to go all the way to the Project Properties dialog:


The element in the status bar listens for the current project, gets its runtime arguments, lets you change them (press Enter to confirm, at which point they're written into nbproject/private/private.properties, which is where the 'application.args' property is stored), which means the runtime arguments are changed, without you having needed to go all the way to the Run tab of the Project Properties dialog. Handy when you're a teacher opening many different projects (i.e., from your students) and needing to change the application arguments to read in various files. Get the plugin here!

Slides used during the first part of the presentation to give some structure to the workshop are here.

Tuesday Nov 25, 2014

Extending the NetBeans IDE Debugger (Part 2)

One way to extend the NetBeans IDE Debugger is to listen to the global context Lookup, as done in part 1 and in the recent Breakpoint Beep story. Another way is to use the extension points that you see when you extend the layer file in a NetBeans module:

For the functionality shown yesterday, i.e., barking breakpoints in the NetBeans IDE Debugger, I started by adding the following to the layer file:

<folder name="Debugger">
    <folder name="BreakpointsView">
        <folder name="Toolbar">
            <file name="org-netbeans-jpda-beep-BreakpointBeepButton-createNewBreakpointActionButton.instance">
                <attr name="serviceClass" stringvalue="java.awt.Component"/>
                <attr name="instanceOf" stringvalue="java.awt.Component"/>
                <attr
                    methodvalue="org.netbeans.jpda.beep.BreakpointBeepButton.createNewBreakpointActionButton" 
                    name="instanceCreate"/>
                <attr intvalue="300" name="position"/>
            </file>
        </folder>
    </folder>
</folder>

Then I added the following, i.e., notice that the FQN of the class below (and the 'public static' are VERY important) is matched in the XML above, and then pops up a JPanel, named BeepChoicePanel. There, the DebuggerManager is used, but that's a topic for another blog entry.


Now you know how to add new JButtons to the left sidebar of the Breakpoints window in NetBeans IDE. Probably the layer file entries could be converted to a @ServiceProvider annotation, but that's also a topic for another blog entry.

Monday Nov 24, 2014

Barking Breakpoints in the NetBeans IDE Debugger

Especially when you have complex breakpoint definitions, such as conditional breakpoints and dependent breakpoints, your debug sessions can become difficult to understand. Why not inject some sounds into the process?

I have created a "Beep Selector" for the Breakpoints window. Notice that there's a new button in the left of the window, right below "Create new breakpoint" and "Select breakpoint groups". The icon displayed on it is what you'd expect a sound icon to look like. That button is provided by the plugin I've created. When clicked, the Beep Selector dialog opens. Predefined, you see "Dog" and "Sheep". However, anyone can drop any WAV file into the user directory, within the "Debugger/BreakpointsView/Sounds" folder, which you will need to create yourself. Any file found in that folder is automatically picked up when the dialog above reopens, no checks are done at this point, i.e., make sure it makes sense to put a file there.

Here are some great sound files:

http://www.findsounds.com/ISAPI/search.dll

Then any breakpoint can be mapped to any sound, either one of the predefined ones, or your own sound. And then, when the breakpoint is hit, you'll hear your sound! As stated at the start of this blog entry, this is especially handy when you have branching breakpoints, i.e., dependent or conditional breakpoints. You'll immediately be informed when one branch is taken, e.g., the 'true' condition can enable a series of breakpoints that relate to one outcome, while 'false' goes off in another direction. Assign one sound to the breakpoints in one branch and a different sound to the other branch and then your debugging will be much simpler.

And it actually works, for me. Testers welcome, please realize it is basically in Alpha state right now, though.

Get it here: http://plugins.netbeans.org/plugin/56682

Right now, to remove a sound, simply delete the breakpoint.

Friday Nov 21, 2014

Breakpoint Beep

Here you see it in action, i.e., in the Breakpoints window, a LineBreakpoint is selected, which causes the text shown above to be displayed in the status bar and, later, a beep to be heard when the breakpoint is hit:

Thursday Nov 20, 2014

Ceylon for NetBeans IDE 8.0.1

The history of Ceylon support in NetBeans can be divided into three stages. In 2012, syntax coloring was created; in 2013, code completion was added; and yesterday, during Java2Days in Sofia in Bulgaria, where I ran into Ceylon lead Stephane Epardaud (@UnFroMage), i.e., in 2014, and under his guidance the Ceylon libraries in the NetBeans plugin were upgraded to the latest versions, syntax coloring was updated, the start of code folding has been implemented, and the Ceylon parser is partly integrated to check for syntax errors.

Above you see one of the Ceylon sample projects expanded to show one file, with syntax coloring, and the initial comment within a code fold.

And here you see the parser in action because a semi-colon has been omitted:

The message displayed when you hover over the red error icon or the red error mark is as follows, which comes from the Ceylon parser:

Here's the repo:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.1/misc/Ceylon

Wednesday Nov 19, 2014

Few Women Want To Be Programmers Because Few Male Programmers Are Kind

While at Devoxx a week or so ago, the discussion about "why there are not more female programmers" was held, yet again. The abstract of the BOF that was held on this topic starts off with: "It feels like women still are strongly underrepresented in the Java ecosystem. It is even worse than in the JavaScript or Python world." Etc. And then there's the usual discussion about why this might be, about how to get more involved, how to participate in projects, about mentoring programs, about needing to have more women speakers at conferences, etc etc.

In another session, rather oddly, I learned that balloons and cupcakes are needed. At first, I looked with raised eyebrows at the guy that I was attending the session with, and we both silently mouthed something like: "Wow, there would be an OUTCRY if a male programmer were to stand on that stage and say that there need to be cupcakes and balloons in order to bring women to programming conferences." (And he'd be blacklisted from speaking ever again at any conference anywhere in the world, on any topic at all, which as far as I know has never ever happened before, making for the shortest blacklist ever.) It was, however, a female programmer on the stage (with an atypical speaker background, i.e., not from the US or EU, so some cultural differences were the basis of the perspective I believe), who also talked about a need for daycare facilities at conferences, as a precondition for more women attendees.

I've thought more about this and in my humble opinion the balloons and cupcakes theory is closer to the mark than one might think. There is a pervasive curtness and to-the-pointness and a OK-I'll-help-you-but-you-better-not-waste-my-time-by-showing-you're-an-idiotness that is more than apparent throughout the developer community, regardless of the language or the technology, i.e., in the Java community, in the Python community, in all kinds of developer communities.

Myself included! I'm often very direct and curt and might more often than not come across as being unkind, in the context of my work within various, primarily Java, developer communities. And that's simply because I want to get the job done, help out, give advice, and then move on to the next thing to work on, or to help with, or to give advice on. "Being nice", smiling, being patient, etc, are always secondary to those aims. No matter how much you, if you're a male, reading this, are now thinking to yourself: "Well, speak for yourself. I'm pretty kind and I smile a lot," I don't believe you. I believe you're hurried and when you're hacking with someone, you want to work quickly, with a lot of speed, you want to hurriedly fix one thing, and then hurry on to another thing, you want to quickly add new features, and fix bugs, and there's time pressure, all the time.

In fact, the real question is, therefore not "Why do so few women want to be programmers?" The question, the real question, is: "Why do so many men want to be programmers", given this unkind (yes, yes, you're helpful, but you're hurried, you're on the clock, no time for cupcakes, and you think balloons at conferences are ridiculous, proving my point) ecosystem?

In short, the programming world is a pretty fast paced environment, in which you need to move fast and accurately, where you tend to get looked down upon when making mistakes, code fast, and do everything else fast. The point isn't that women aren't up to those tasks, I'm sure they are. But why would they want to be? So the question is why do men not find this environment so problematic that they choose to stay far away from it? The only exception to all this that I know of is mob programming, as explained to me by the wonderful Woody Zuill, which is a very kind environment, embracing of newbies and supportive from the beginning of the day to the end:

To me, a BOF worth having on this topic should not have any women in it, as every year at Devoxx and so many other conferences. Instead, there should be a BOF aimed at men (myself included!) and about being kinder, with a title like "Towards a Friendlier Developer Community". There's something seriously wrong with men (as well as the few women who are in the various developer communities) that we tolerate the unkind, intimidating, impatient, macho attitudes that pervade the software industry, as well as so many other industries, I might add.

Tuesday Nov 18, 2014

Red Hat OpenShift

When you're thinking about creating a NetBeans plugin for your favorite technology, there's not much that hasn't been created already, in one way or another. For example, want to create a NetBeans plugin for your web framework? Not a problem, just look at all the open source projects, as well as the NetBeans source code, to see how tools for PrimeFaces, Wicket, Tapestry, etc etc, have been implemented. Want to create a NetBeans plugin for your favorite application server? No problem at all, just look at the code of the other application server plugins and then you can, as Emmanual Hugonnet and other guys at Red Hat have done, create a plugin for WildFly, etc.

And so Cojan van Ballegooijen and others in the Red Hat community interested in NetBeans integration for OpenShift don't need to worry, either, since there are several NetBeans plugins already for cloud providers, e.g., Oracle Cloud, Amazon Beanstalk, and Jelastic. Thanks to a bit of refactoring of the Amazon Beanstalk plugin, which is open sourced since it is part of the NetBeans sources, here's the start of the OpenShift plugin:

The basic infrastructure shown above is in place and can be found here:

https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.1/OpenShift

It should probably be put on GitHub so that anyone can clone it and then fill in all the OpenShift-specific settings, e.g., the logic for connecting to the OpenShift services, the logic for deploying to OpenShift, and the logic for displaying the artifacts deployed to OpenShift. And all that can be based on the Amazon Beanstalk code, too.

And all thanks to open source, without which none of the above would be possible. 

Related issue: https://netbeans.org/bugzilla/show_bug.cgi?id=227440

Saturday Nov 15, 2014

YouTube: How to Work with HTML Files?

Plain and simple HTML files are the basis of a range of different applications, from websites to mobile apps. Working efficiently with HTML files, how do you do that? Here's a short new YouTube clip that starts off with a basic HTML file and then shows a range of free tools that can make your tasks a lot more pleasurable:

Go here for many more similar YouTube movies.

Friday Nov 14, 2014

Bug Fixes and Enhancements for NetBeans Cheat Sheets

I fixed several problems in the Cheat Sheets plugin and added a cool new feature.

  1. Installation problem. Several people weren't able to install the plugin in the first place, or didn't see the two new windows provided by the plugin when they thought they had installed it. That's because the plugin was built with all the patches for 8.0.1 included, which meant that one of the NetBeans modules used in the plugin was at a higher level than what you'd have in 8.0.1 if you hadn't updated it, i.e., to patch 1.1. I discovered that the problematic module (the Datasystems API) wasn't needed in any case, so removed that module from the dependency list. Now the plugin should install successfully if you're using 8.0.1 without any of the patches installed.

  2. Parsing problem 1. Several people were able to install the plugin but didn't see anything in the two windows provided by the plugin. That's because the parser attempts to validate and resolve any references in the document, automatically, including "netbeans.org". When you're using the plugin while not on-line or behind a proxy, the automatic resolver fails and the plugin crashes. I was able to reproduce this problem and, following the instructions here, I fixed the problem, and now even when I am not on-line, the plugin works, because the automatic resolution is disabled.

  3. Parsing problem 2. The PHP and HTML code templates files weren't parsed correctly, so that only the left-hand side of the Code Templates window was shown, not the right-hand side. That's fixed now.

  4. Context-sensitivity enhancement. I was demonstrating the plugin during Devoxx to my ex-colleague (and current Red Hatter) Cojan van Ballegooijen (and we encountered parsing problem 1 several times), who suggested the following new feature: "Whenever a document of a certain type is opened, the Code Templates window should automatically switch to the relevant set of code templates." That's a cool idea and thanks to the Lookup (i.e., in the TopComponent, listen to the Lookup for the current FileObject in the global context, check for its MIME type, and then switch the code templates accordingly).

Below you can see the point, i.e., now an HTML file is open and hence automatically the Code Templates window shows the code templates specific to HTML files.

From the above, you can also see that the plugin hasn't only been tried successfully on Windows, but on Ubuntu too.

Right now, code templates for PHP, HTML, Java, and XML are supported. A next feature could be support for more code template files, as well as an automatic update of the windows when the key bindings or code templates are changed in the Options window, because right now any changes you make will not be reflected, whether you restart or not. That's because changes to the settings shown above are done in different files to the ones that the plugin listens to, at the moment. So the next enhancement will be to listen to changes to the file where changes to these settings are stored.

If you'd like to try out these changes, go to the plugin's location in the Plugin Portal below, download the NBM, install it into NetBeans IDE 8.0.1 (you should notice in the Plugin Manager that the version of the plugin is 4.0), and then (after a moment, while the plugin installs) you should see your new windows appear, which are also openable under the Window menu, where you should see "Code Templates" and "Key Bindings" menu items.

http://plugins.netbeans.org/plugin/49660/netbeans-cheat-sheets

Thursday Nov 13, 2014

Obrigado Spellchecker for NetBeans IDE

Let's set up Portuguese spellchecking in NetBeans IDE. The aim is to see words like this, i.e., Portuguese words, instead of English words:

In the Options window, I registered a "pt_PT" spellchecker, as shown below:

To be able to register the above spellchecker, I clicked Add above and then used the Add Dictionary dialog, shown below:

The "aspell_dump_pt_PT.txt" file that you see above was created on the command line.

aspell --lang=pt_PT --master=pt_PT dump master | sort > aspell_dump_pt_PT.txt

The above assumes that Aspell has been installed and that the "pt_PT" Aspell dictionary has been installed.

To achieve the above, i.e., to set up Aspell and its Portuguese dictionary, simply follow step 1 of the document below:

http://lermitage.biz/devblog/index.php?post/2012/03/18/How-to-build-a-dictionary-for-the-NetBeans-online-spellchecker

The majority of the document above discusses how to create a NetBeans module that bundles the Portuguese dictionary. I think it can be done more simply than is described above and will make a blog entry about that. However, you now have enough information to at least make a dictionary file and register it into your own NetBeans IDE installation.

Obrigado! 

About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« March 2015
SunMonTueWedThuFriSat
4
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today