Thursday, August 27, 2015

Win 10, My new Best Friend

I think I have found my second favorite operating system! In this ongoing post, I want to share some tips and tricks that will enhance your love for this new gem from Microsoft. (No, I don't work for Microsoft)

Tip #1: Disable Cortana Web Search


Okay, so Cortana is supposed to be this "Ms. Smartypants" when it comes to your likes and dislikes. She also searches the web for you when you have the need to find something. Cortana is just a little bit too eager to search for things on the internet when I really just want her to find the stuff I've already put onto my PC.

I am a fan of Ubuntu 14. The taskbar in Ubuntu will allow you to do a soft search for any app in your pc by pressing the "Window" key on your keyboard. To emulate this with Cortana in Win 10, just disable her Web Search capability (She happens to be much more useful in this mode).

To disable the Web Search feature, just go to your firewall settings:

  1. Go to Control Panel by right clicking on the "Start Menu" icon in the lower left on the taskbar and select "Control Panel"
  2. If you view by category, select Network and Internet, then on the left, select System and Security.
  3. Select Windows Firewall
  4. Select Advanced Settings
  5. In the new window, select, Outbound Rules and wait for it to load
  6. Look for a single rule called "Search", right click on the rule, and select Properties
  7. In the Action grouping at the bottom, select "Block the connection"

Be warned however, you will no longer be able to search the internet via Cortana, however, she will default to finding things on your computer.

Thursday, August 20, 2015

Making a Silky Calculator

I like Silk. This dependency injection framework is just AWESOME! It is so intuitive that I just have to give it two thumbs up. Why? Because it makes dependency injection a part of the native Java language and is definitely simple to set up and use.

So I thought I would give it a go with one of my favorite web frameworks, Vaadin. I have used Vaadin off-and-on for about a year now and I have to say it is pretty slick. Vaadin is such a quick framework. When you need to get something to the screen Vaadin can build it fairly fast. And the code is so simple, it can easily simulate procedural coding. As a result, the code you write while putting up a quick prototype usually ends up a hot mess to read through the next day.

In with the fancy patterns now!

I decided to re-create the Calculator sample application on the Vaadin.com website.

Creation of a project is easy enough. I downloaded the latest version of Eclipse (Mars) and then installed the Vaadin framework through the Eclipse Marketplace.


I had an easy time using Ant to build SilkDI from www.silkDI.com. To build the Silk library, simply import the project to your eclipse workspace and run the ant task by clicking on the build.xml file and pressing Alt+Shift+X, then press the letter Q. The library, sources and Javadoc will be created. You just need the library added to your build path.



I built the user interface up using the new Vaadin Designer tool but the thing stopped working promptly after I finished the look and feel. So I had to limp by modifying the new html format manually. Not the most fun experience...



Thankfully, the interface is simple enough, what goes into a calculator other than a few numbers and some symbols? I just made all the buttons into a grid and included a text box for the display. I had to later change the text box for a label, since the text box read-only property prevents modification from the program side as well as the user side. Wish they would make up their minds on that.

I also ran into some trouble getting the Silk to work, but that was due to my sheer ignorance when it comes to actually wiring dependencies. I did some looking at the examples on the SilkDI site and managed to make it work. I had to understand how the objects were being constructed in the background and realize which examples were worth bothering with and which were for more advanced applications.

Separating the concerns of the Presenter, View and Model were easy as cake using Java 8. Passing behavior to each button was so much easier than the Calculator example on Vaadin's own site. I went the route of creating a single method that obtained the button's text then passed a communication to the model for interpretation. I would have liked to spend more time fleshing out a better separation of the business logic out of the Presenter, but in the end, I like how it turned out.

As far as the separation goes, I added a twist to the example Calculator app on the Vaadin website and created both a BigInteger and a BigDecimal model and added a button that would switch between the two types of calculators. The calculator that depends on the Integers will truncate the decimal places for us (obviously).

Check out the sample app in the links on the right.

Update: I've put the source up on GitHub

Thanks for reading.

Saturday, August 15, 2015

No Country for Old Databases

I can't get over how bad the user interface for IBM Domino Designer and Notes are. Having only used the tool for a year and a half, I can't imagine how people have been developing in this tool for so long. IBM claims that you can do pure Java development in Domino, but it was clearly just an afterthought. You can't run a debugger on your XPages beans without going through hoops, you can't properly test XPages in the Notes client if they contain iframes to classic notes forms. Many things are missing or patchwork when it comes right down to it. A throwback to the "Old West" of coding cowboy greatness.
The Cowboy Coder aspect of the Designer and Notes client integration is cool and all, but in lieu of IDE experiences like IntelliJ, IBM's shoddy Designer with their half-baked implementation of Eclipse is laughable. With almost zero integration of source control, you need yet another hack to work with modern tools like Git and Mercurial. The hack used to get those tools to play nice with the Designer IDE is DXL.
IBM's implementation of DXL is the bane of my existence. In all, we have ended up with massive data corruption, overwrites, and simple inability to control our software when attempting to use Mercurial. This is because the export of DXL attaches metadata to the file, things like last-accessed date etc. Needless to say, you receive multiple merge conflicts with this. IBM's DXL also removes pass-thru html tags in legacy code because it melds in with the DXL header. Of course, this is completely unavoidable. You either use the DXL or you need to do your version control by storing design copies...
With all these issues vented I can say that the backend Domino solution is one of the best solutions built around a NoSQL database that I have ever seen. The security model is very tightly integrated with the query logic down to the fields on documents. Building reusable business logic around Domino security model is like icing on a particularly tasty cake. Access restriction can be an afterthought in your design and still be more powerful than 80% of solutions based on NoSQL databases.
This is why I feel like IBM should do more to market this software as a NoSQL DB and make it better integrated into modern Java frameworks. While the integrated http service is great, they should do more to promote the use of Tomcat, as this is the core of some of my personal favorite frameworks. And for goodness sakes, they really need to upgrade to IBM JDK8! (I admit to this being more of a nit than anything)
I can see why they would be hesitant. I am not completely sure, but, I have noticed that there are very few 'young' notes developers nowadays. IBM would be smart to do less to alienate their current users of Domino. But I can tell you this, after attempting to build a Domino clone using MongoDB and Go, I have realized just how good these old geezers have it with the amount of tools at their disposal for making a NoSQL database work in the business world.

Thanks for reading.

Wednesday, August 12, 2015

The One Most AWESOME Thing Ever in Gaming

Games... If you are like me, you must play games a lot... Yet, for all the games that we play, there are none that have the virtual commodity that you feel like you own it "for reals". You play a game, get some laughs and enjoy it for the moment, then that's it... If you play "Free" games, you sometimes end up giving up a buck or two for that small "advantage". Do you really feel like you have something special here? If you are like me, you mostly feel good until there is something else to buy, then you suddenly feel used... That's why I want to dedicate my next project to creating this tangible item... Something that I don't have to buy. A gamer's inalienable right.
After speaking with some friends, co-workers, family, etc. I've discovered that there is pretty much nothing that can touch this feeling of ownership. Most people think of gaming as something that just exists in the virtual world, completely separate from the realm of the "real". Shame, that all those technological advances that exist now cannot bring our pretend worlds any closer. Sure there are VR headsets and AR devices, but what about these experiences is any different that what we do now? Will having something look better really provide a different stimulus? We've tried that in gaming for years now, and I can tell you, incredible visuals and great gameplay are far too often a "Rob Peter to pay Paul".
Take, for example, Evolve, a more recent 3d game with great immersive graphics and little in the way of gameplay, and compare it to Terraria, a 2d game with okay graphics but packed full of gameplay. Both games are good in their own right, but I'd wager that an amalgam of the two, Evolarria, would be AWESOME! Sadly, this would cost a lot of money and time. But what if you could take AWESOME gameplay of game A, and make it completely modular? Plug gameplay A into graphics powerhouse title B and come up with a new product C. Product C is AWESOME! Product C goes on to sell multiple millions of copies! Whatever! The idea I've been shopping around is one that gives us an item of tangibility and provides the gameplay opportunities to titles that support it.
As I sat on the porcelain throne one day, I thought, "Wouldn't it be cool if I had an avatar, pet or something on a device, and I could plug that something into a game, and all of a sudden the game is AWESOME!?" A few companies have done this before of course. There are plenty of games and products like this all over the place. What is so different about this idea than any other? Well... CLOUD! I win! Haha!
In all seriousness though, I feel like the internet-of-things will enable this unlike any other. A holographic/picture pane depicting your avatar all the time. It lives in the device. It is sellable. It is transmitted to your game (wifi to cloud to game or some mix of that). It gains experience with your gameplay. It gathers items from each of your games. When you want to transfer it to another person, you put it into a state of hibernation and turn off the device, sell it to them, then they use it in the same way you did. It is real property, a tangible benefit, something AWESOME to make your games AWESOME. You take it in your pocket to work and show it off. You take it to school and get it taken from you, but not before you show it off!
Implementation would be interesting. I had thought of keeping a checksum of all possible variations and combinations of all avatars in a sort of cloud-bank scenario inspired by virtual currency. Whenever a person's avatar gained items or customization, it would be compared to the list of registered customizations provided by partnering games. Unregistered customizations can still be supported, but will only work for certain games or offline versions. In the end though, I wish for both the client and server systems to be open-sourced. If someone wants to make money off this venture, they should work to provide the best service they can, creating custom games supporting their avatar item checksums. Their customizations should also be compatible with other servers and games and they should help to maintain the community of avatars.
When we ultimately make the move to AR-central gaming, this system will be one of the backbones that drives gameplay in the years to come.

Thanks for reading.