Posted by: joshjcarrier | January 4, 2010

C++ Windows Development with Eclipse, MinGW and wxWidgets

I’ve recently gotten interested lately in “write once, run everywhere” apps for C++,  where we don’t have the luxury of a Java or similar virtual machine. The idea behind writing in C++ is to remove the dependency of my usual Java runtime environment, and instead use the wxWidgets project to build a C++ project which can be compiled for any architecture it supports (Windows/Linux/Mac). It may also offer performance benefits. In the following guide, I wanted the wxWidgets library statically compiled so that the compilation’s end result is one stand-alone executable which requires nothing else to run.wxwidgets

wxWidgets provides a large set of C++ libraries which will act as an intermediary between my code and operating system-specific calls, such as window handling, networking and disk access. Multi-platform support is then simply a matter of changing the wxWidgets library from one OS’s version to another.

Our ingredients:

Here’s my setup guide.

Read More…

Posted by: joshjcarrier | November 10, 2009

Setting up Mercurial on a shared server with FTP

Mercurial logo.png

This guide assumes you want to set up your own private Mercurial repositories, but want to do so on a server where:

  • you have no SSH or shell access, just an FTP connection/file manager 
  • it has Python 2.4 or greater already installed
  • is a Linux host (although a Windows host should work similarly with this procedure)

Previous guides I’ve come across on the web here and here require you to build Mercurial from source, which might not work depending on how strict your host is at giving you access to programs like the GCC compiler. Our solution here will be to package our own pre-compiled Mercurial binary.

Read More…

Posted by: joshjcarrier | October 29, 2009

ResNet Quota Monitor 2 still in works, maybe going open-source

Animated side-scrolling display and tray icon.

Animated side-scrolling display and tray icon.

The latest version of the ResNet Quota Monitor is still under works, but development is slow since I’m not staying on campus residence and thus allocate a lot less time to it than I used to. That being said, I’m considering to open this project up for others to contribute, so stay tuned…

This new version removes the “balloon” notification, in favour of a slidey toaster/growler that will have a standard look and feel across Windows, OS X and the various flavours of Java-compatible Linux. Here’s a sneak peak – with some icon work by Vince from www.3ntrance.com .

Structually, the system is being re-done, with use of a more intuitive blackboard design pattern revolving around a built-in plug-in manager, for future plug-ins written by the community. It should be robust enough to be extrapolated for other colleges, or just as an application framework for any multi-component project.

And remember, if you ever have UBC ResNet, wireless, VPN, or even Campus Wide Login (CWL) problems, remember to visit the friendly staff at the UBC IT Help Desk.

Posted by: joshjcarrier | October 25, 2009

Sun Jersey 1.0.3.1 and Google App Engine 1.2.6

You most likely have come across the following “warning” level log entry in your Google App Engine logs if you’ve been using Sun’s jersey-core 1.0.x jar and the Google App Engine 1.2.6 SDK:

com.sun.jersey.core.spi.component.ProviderFactory __getComponentProvider: The provider class, class com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$App, could not be instantiated. Processing will continue but the class will not be utilized
java.lang.SecurityException: Unable to get members for class com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$App
at com.google.appengine.runtime.Request.process-819e5bfbf2e72052(Request.java)
at java.lang.Class.getMethods(Class.java:180)
at com.sun.jersey.core.reflection.MethodList.<init>(MethodList.java:57)
at com.sun.jersey.core.spi.component.ComponentConstructor.getPostConstructMethod(ComponentConstructor.java:121)
at com.sun.jersey.core.spi.component.ComponentConstructor.<init>(ComponentConstructor.java:115)
at com.sun.jersey.core.spi.component.ProviderFactory.__getComponentProvider(ProviderFactory.java:158)
at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:130)
at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:190)
at com.sun.jersey.core.spi.component.ProviderServices.getProvidersAndServices(ProviderServices.java:120)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.getProviderMap(MessageBodyFactory.java:136)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.initReaders(MessageBodyFactory.java:110)
at com.sun.jersey.core.spi.factory.MessageBodyFactory.init(MessageBodyFactory.java:105)
at com.sun.jersey.api.client.Client.<init>(Client.java:257)
at com.sun.jersey.api.client.Client.<init>(Client.java:133)
at com.sun.jersey.api.client.Client.create(Client.java:444)
at com.socialjava.TinyFBClient.<init>(TinyFBClient.java:42)
at com.socialjava.TinyFBClient.<init>(TinyFBClient.java:47)
at com.socialjava.TinyFBClient.<init>(TinyFBClient.java:58)
Pictured: a broken jar.

A broken jar.

… and so on, for a lot longer.

In my case, this was due to the Jersey implementation that goes along side Social Java’s Tiny Facebook Client. The App engine admin panel reports that these exceptions are using up a lot of cpu time per request, which is never a good thing. Here’s how to silence them.

 

 

Read More…

Posted by: joshjcarrier | October 17, 2009

Mojarra JSF 2.0 RC2 and Google App Engine SDK 1.2.6

So a recent update to the Google App Engine SDK broke my JSF 2.0 web application. I received this message on local server start-up:

WARNING: Error starting handlersGoogle_App_Engine_logo_wtxt
Throwable occurred: java.lang.NoClassDefFoundError:
javax.naming.InitialContext is a restricted class. Please see the Google
App Engine developer’s guide for more details.

Apparently this was due to how JSF checks if it can use InitialContext first  (bug report)- by invoking it. Unfortunately, this sends GAE into a panic, since javax.naming.InitialContext is not one of the whitelisted JRE classes.

**Edit 3: for your convenience, I have pre-packaged this solution into its own .jar file. See bottom of post for further details.

Read More…

Posted by: joshjcarrier | September 29, 2009

Microsoft Info Session UBC

msft promo 2009If any UBC students are on campus October 1st, Microsoft would like to invite you to join them at a “Meet the Company” info session in the Forest Sciences centre.

 

More information:
https://careers.microsoft.com/careers/en/us/collegehome.aspx

Location: FSC 1005
http://www.maps.ubc.ca/PROD/index_detail.php?show=y,n,n,n,n,y&bldg2Search=n&locat1=353

Posted by: joshjcarrier | April 19, 2009

Updates soon…

Well I told myself I’d regularly keep a log of what’s going on in my tech life – and clearly that hasn’t been happening. Basically due to the school term and a web prototype called GISH-N (Georeference Information System for Horticulture and Nature (a good use of acronyms)) which finally had given me a cause to try out CodeIgniter.

As I close up my books for the beginnings of summer, I plan to open up my laptop and bring you:

  • Team Development and CodeIgniter – 6 people, four months, and countless hours of code
  • ResNet Quota Monitor for UBC, v2 – meaner, cleaner, and slicker than before – will be available for Windows/Mac/Linux!
  • Distributed Computing Framework – working on a system to easily make your Java App rise into the clouds
  • Source Version Control – could  Mercurial be replacing SVN in my future?
    Can’t wait to learn about it? See the Google Tech Talk here:
    Props to Nathaniel for bringing this up

See you in the near future!

Posted by: joshjcarrier | December 12, 2008

The top 3 worst types of snow

Now usually I don’t mind snow, but there are certain types you’ll surely recognize that are just plain annoying. The following is my top three.

3. Slush: these little heaps of snow end up mixing with mud and other flavors of crud. You might consider to go outside, but prepare to get wet.

2. Ice: you’ll be taking baby steps as you strategically get from point A to B. You might as well be traversing a minefield, but you’ll get to where you want to go eventually.

Read More…

Posted by: joshjcarrier | December 4, 2008

Installing CodeIgniter 1.7 on Aprelium Abyss Web Server (X1/X2)

CodeIgniter is a powerful object-oriented PHP framework that Nathaniel introduced me too. It saves a lot of time and pain by structuring your PHP-based application in a logical way while providing you the tools you need to easily render forms, safely access databases, and much more with minimal code. It also utilizes the popular Model-View-Controller (MVC) design, commonly seen in Java Enterprise and ASP.

Trademark of Code Igniter

Trademark of CodeIgniter

Unfortunately, CodeIgniter may not run nicely with certain configurations of PHP and non-Apache web servers due to the handling of the PATH_INFO variable (common diagnosis is only being able to hit your index page, no matter what the URL is). The following sets up PHP and Abyss Web Server to handle this issue.

Read More…

Posted by: joshjcarrier | December 2, 2008

School is eating all my spare cycles

First of all I’d like to state that this blog hasn’t been abandoned – I’ve just been overwhelmed recently with assignments, school projects and finals. It’s also introduced me to developing rich client applications/plug-ins on the Eclipse framework (see these tutorials from Eclipsecon 2005, old, but still very relevant) and sparked some interest in AspectJ and aspect-oriented programming.

Trademark of the Eclipse Foundation

Trademark of the Eclipse Foundation

For those of you that aren’t familiar with Eclipse, it’s well known as a Java-based development environment for software development after starting as a project within IBM. WIth Eclipse’s RCP and plug-in development tools, you can develop and deploy your own application on top of the Eclipse application framework.

Left, the Eclipse Java Development Environment developing a rich client application; right, the rich client application running the Eclipse framework

Left, the Eclipse Java Development Environment developing a rich client application; right, the rich client application running the Eclipse framework

As for current projects; the ResNet Quota Monitor has since been revived with a revamp to the UI and feature improvements. Also, I’m putting together a prototype for a Helpdesk agent assistant environment called the “IT Help Desker”. More on that and many other techy tidbits in the weeks to come!

Older Posts »

Categories