Posts

Showing posts with the label Java

So Long, and Thanks For All The Pizza

Image
On a cold Wisconsin day in December 2014, my good friend Jonathan Kupcho  and I patiently waited next to 2 large Dominos pizzas, and a case of warm Diet Coke.   We had 11 RSVPs.  Some of them would show up... right?   Had we given clear enough directions, and parking instructions?  Did people deem it too cold to journey out that night?  Our fears subsided as the first attendees started to trickle in.  I don't remember the exact number of attendees, but the exact number is not important.  People came! That night was the first event ever for the Greater Milwaukee Java Meetup . As the organizer of this meetup, I planned, emailed, called, coordinated, ordered pizza, ran to the grocery store, and even had time to do a bit of open sourcing!  Now, over 50 events later, I am stepping down to let others run the group.  Before I fade into obscurity, I want to share the lessons I learned while running this meetup.  Hopefully you...

Java 8 - Using Parallel Streams

Java 8 is not slated to come out until Spring 2014, but the features are so enticing that I just had to download the snapshot, and give it a test run. After messing with python the past few weeks the Java 8 feature that I am most looking forward to is lambda support. The second feature I'm digging is the new Stream API. Now these are both very useful APIs on their own, but I really like how Python uses them with the functions filter, map, and reduce. You can read about that here if you'd like. Java 8 provides the same functionality, but it is a bit more verbose. On the plus side, it gives you a few extra useful features that Python does not. (At least that I know of, I'm a Python n00b.) Note: All example code can be found here. My first test was just a few simple filters, and maps. public void test1() { List strings = Arrays.asList( "One","Two","Three","Four","Five"); List longerThanThree =...

Taming the GWT PopupPanel

I was working on a feature of a GWT application today, and decided to fix a problem that had been bugging me.  While the issue was not a server crashing bug, it was a usability nuisance. Between the main content of the app, and the navigation bar, there was an Anchor.  When a user moused over the Anchor, a PopupPanel would be shown with some user data in it.  Everytime i moved my mouse up to the navigation bar, I'd mouse over the anchor, and have this annoying PopupPanel in my way.  To compund the issue, there was a RPC call each time the panel was popped up. To combat this issue, I decided to use the GWT Timer class, along with the MouseOverEvent and MouseOutEvent.  This was incredibly simple after I moved the presenter and view to use the UiField, and UiHandler annotations along with the UiBinder. The Code: @UiHandler("popupAnchor") void showPopup(ClickEvent e) { showPopup(); } private long mouseOverTime = 0; private int loadPopupTime = 300; @Ui...