

I recently had a first-hand experience of thrashing while in the middle of a product’s release cycle. As much as I’d like to talk about circumstances, it’s best if I’ll just point out ways on how to get out of it.
I could’ve done a lot of things to get out my demotivated state, but I thought that the best thing that I can do is to keep on focusing on shipping the product on the release date. Focus by pushing myself to do emotional work and not worry about other things but to ship the product. Focusing on shipping the product is the only way to actually ship the product.
There were times when I felt that some of my team members are getting way too ahead of themselves. Don’t listen. Don’t even take note of those futuristic (and sometimes, non-realistic) ideas. Those ideas are not 1.0 material so there’s no point bothering myself, or the team, with them. If those ideas are really awesome, or important, they will come back to remind us after we ship 1.0. Until then, we needed to focus on those 1.0 release goals.
Lastly, it’s difficult to be perfect when you have tight deadlines and a release date looming. There were times when I thought we could’ve written parts of the code a bit better, refactored a bit better, and tested a bit better. I was demotivated for a while that we had hacks here and there and all I could was to add FIXMEs. Shame. But we’re not going to ship it on the date if we kept it pure, if we kept it clean. We had to ship, and unfortunately, we had to live with those technical debts. And that’s just reality.




applications, platforms or infrastructure are made available from a central service provider, similar to our utility companies for electricity, water and telecommunication. This simple concept has immense implications.

Publishing a ClickOnce installer in Visual Studio 2008 is a hit-and-miss, and most of the time it’s a miss. It’s either you get build errors due to missing intermediate files, or if it’s successful, the application won’t launch due to a missing application.xaml file. This shouldn’t happen, and there’s not much you, the developer, can do unless you know how VS 2008’s ClickOnce publishing works.
But, there’s a workaround and that is to use MSBuild to generate your installer. On a single project solution, this should be as easy as typing msbuild.exe /target:publish in the top-level solution folder. If you have other projects within the solution that you want to generate a ClickOnce installer of, just go to that folder and use MSBuild to publish.






There were a few times when I wanted to follow a specific tweet in Twitter because I’m interested in what other people will say. For example, if Brad asks if there are restaurants nearby that serve Laksa, I would be interested in what his followers will recommend as well because, I too, like Laksa[0].
This feature has more value to me. It’s like Quora but for tweets.
[0] Yes, you can use geolocation services but I hope you get my point.







package com.sample.config;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.servlet.ServletHandler;
import org.mortbay.jetty.webapp.WebAppContext;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.GenericWebApplicationContext;
public class ServerConfigurer
extends Server
implements ApplicationContextAware
{
private String _webAppDir = null;
private String _contextPath = null;
private ServletHandler _servletHandler = null;
private static ApplicationContext _applicationContext = null;
public String getContextPath() {
return _contextPath;
}
public ServletHandler getServletHandler() {
return _servletHandler;
}
public String getWebAppDir() {
return _webAppDir;
}
/**
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
*/
@Override
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
{
_applicationContext = applicationContext;
}
public void setContextPath(String contextPath) {
_contextPath = contextPath;
}
public void setServletHandler(ServletHandler servletHandler) {
_servletHandler = servletHandler;
}
public void setWebAppDir(String webAppDir) {
_webAppDir = webAppDir;
}
@Override
protected void doStart()
throws Exception
{
final WebAppContext webAppContext = new WebAppContext(getServer(), _webAppDir, _contextPath);
final GenericWebApplicationContext webApplicationContext = new GenericWebApplicationContext();
webApplicationContext.setServletContext(webAppContext.getServletContext());
webApplicationContext.setParent(_applicationContext);
webAppContext.getServletContext().setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, webApplicationContext);
webApplicationContext.refresh();
webAppContext.setServletHandler(_servletHandler);
addHandler(webAppContext);
super.doStart();
}
}<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" >
<!-- more beans configured -->
<bean name="webServer" class="point to your server configurer java file" init-method="start">
<property name="connectors">
<list>
<bean class="org.mortbay.jetty.nio.SelectChannelConnector">
<property name="host" value="${jetty.host}"/>
<property name="port" value="${jetty.port}"/>
</bean>
</list>
</property>
<property name="webAppDir" value="${jetty.webApp.dir}"/>
<property name="contextPath" value="${jetty.context.Path}"/>
<property name="servletHandler">
<bean class="org.mortbay.jetty.servlet.ServletHandler">
<property name="servlets">
<list>
<bean class="org.mortbay.jetty.servlet.ServletHolder">
<property name="name" value="dispatcher" />
<property name="servlet">
<bean class="org.springframework.web.servlet.DispatcherServlet" />
</property>
</bean>
</list>
</property>
<property name="servletMappings">
<list>
<bean class="org.mortbay.jetty.servlet.ServletMapping">
<property name="servletName" value="dispatcher" />
<property name="pathSpec" value="*.htm" />
</bean>
</list>
</property>
</bean>
</property>
<property name="handlers">
<list>
<!-- log handler -->
<bean class="org.mortbay.jetty.handler.RequestLogHandler">
<property name="requestLog">
<bean class="org.mortbay.jetty.NCSARequestLog">
<property name="append" value="true"/>
<property name="filename" value="${http.log.dir}/access.log.yyyy_mm_dd"/>
<property name="extended" value="true"/>
<property name="retainDays" value="999"/>
<property name="filenameDateFormat" value="yyyy-MM-dd"/>
</bean>
</property>
</bean>
</list>
</property>
</bean>
</beans> example:
_applicationContext = new ClassPathXmlApplicationContext(_resourceLocations);
_applicationContext.start();




Posted via email from metahack


Posted via email from metahack


message.welcome= Welcome {0} to {1}!
message.thank= Thank you for you visit {0}.ResourceBundle resBundle = new ResourceBundle("path to property file");
String welcomeText=resBundle.getString("message.welcome");
MessageFormat msgFormatter = new MessageFormat(welcomeText);
// Create the dynamic args you want to replace
Object[] messageArguments = {"Techie boy","Philippines"};
String finalText= msgFormatter.format(messageArguments);

LOG.info("Application starting");
_applicationContext = new ClassPathXmlApplicationContext(_resourceLocations);
_webServer = new Server();
SelectChannelConnector connector = new SelectChannelConnector();
connector.setHost("localhost");
connector.setPort(8080);
_webServer.addConnector(connector);
WebAppContext webAppContext = new WebAppContext(_webServer, "path to web app folder", "/");
GenericWebApplicationContext webApplicationContext = new GenericWebApplicationContext();
webApplicationContext.setServletContext(webAppContext.getServletContext());
webApplicationContext.setParent(_applicationContext);
webAppContext.getServletContext().setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, webApplicationContext);
webApplicationContext.refresh();
ServletHandler servletHandler = new ServletHandler();
ServletHolder servletHolder = new ServletHolder(new DispatcherServlet());
servletHolder.setName("dispatcher");
servletHandler.addServlet(servletHolder);
ServletMapping servletMapping = new ServletMapping();
servletMapping.setServletName(servletHolder.getName());
servletMapping.setPathSpec("*.htm");
servletHandler.addServletMapping(servletMapping);
webAppContext.setServletHandler(servletHandler);
_webServer.addHandler(webAppContext);
RequestLogHandler logHandler = new RequestLogHandler();
NCSARequestLog ncsaLog = new NCSARequestLog();
ncsaLog.setExtended(true);
ncsaLog.setFilename("logs/jetty-yyyy_mm_dd.log");
logHandler.setRequestLog(ncsaLog);
_webServer.addHandler(logHandler);
LOG.info("Starting main application context");
_applicationContext.start();
LOG.info("Starting Jetty Server");
try {
_webServer.start();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
LOG.info("Application started");
return null;


Now I’m back in the Philippines and an update has been long overdue. The week of May 9-14 was spent with much enthusiasm and enjoyment meeting with and getting to know the other names in the Boost C++ Library developers mailing list. The community is alive, well, and growing — lots of first time attendees and veterans of the C++ scene. This post is just about a quick update on the cool things and the goings on about BoostCon 2010.
Arriving at Aspen, Colorado in time for the May 9th registration and informal get together marks Day 0 of BoostCon 2010. Lots of familiar names and not so much familiar faces. The good thing about seeing names and associating faces with them is that it makes the statement “I know <insert person’s name here>” more believable. Just sending emails back and forth is one thing, but there is definitely something else that goes on when you get to meet in person.
Day 0 was uneventful except for meeting for the first time the names and the people behind the conversations that happen typically in the mailing lists.
There are two tracks and day 1 was filled with very interesting presentations about a myriad of topics. The list of talks I attended is below:
My general impression on the first day of BoostCon is that it’s one of those “this is really happening” moments. I got to meet and talk with people I’ve always wanted to meet, some of whom I already worked with in my own libraries. Day 1 set the tone for the next few days, where the sessions are focused and the questions are very good with answers that prove to be better.
This day was marked by the first time I’ve ever encountered snow in my life! So this is definitely one for keeps as far as I am concerned. The list of sessions I attended are below too:
In this day I got to walk from the Aspen Meadows Resort to the Aspen Center for Physics at night alone while snow was pouring down from the sky. Definitely an experience that I will not soon forget. The main takeaway for me in this day is the importance of tools in the development of C++ applications and libraries. Without the great tools C++ developers have access too, it will be hard to imagine to get anything substantial done with the language.
I am looking forward though to a presentation on having better cross-platform C++ debuggers that understand the idiosyncrasies of the C++ programming language better — like exceptions, static initialization, and non-malloc allocators. Because C debuggers can be very C-centric, tacking on a C++ debugger on top might not be the best approach. Maybe clang would go into that too, but that’s me wishing aloud.
This day I got a chance to go swimming at the Aspen Meadows Resort Health Center which had a 25m outdoor heated pool. It was perfect to let me acclimatize to the altitude and to get my blood pumping. The lineup of talks I attended this day is short but definitely worth the wait for me:
There was also a picnic at night where the excellent cooking of some of the attendees made for a very nice way to end the night and have a good day the next day.
This is the day I gave a presentation titled “Techniques in Flexible Header-Only C++ Network Library Implementations” which went into the details of the internals of cpp-netlib. I also attended other talks in the day which I have listed down below:
Day 4 was really a good day for me because I got a lot of interest from the participants who were looking forward to some of the promised changes coming to cpp-netlib and the eventual submission for Boost inclusion — which I’m targeting to be the end of this year. Hopefully there will be more for me to talk about in BoostCon 2011 about cpp-netlib.
The last day of the conference included a talk about “Cross-platform development with Qt and Boost” by Joao Abecasis which I also attended to find out more about GUI programming with Qt. Because of that talk I decided I would take a look at doing some GUI programming with Qt and seeing whether I can expand my horizons to develop useful user-oriented applications too aside from developing developer-oriented tools. The final day also hosted a panel about the future of Boost and I would write another post about what I thought the future of Boost should be like, as well as the discussion that sticks to my mind after that day.
All in all BoostCon 2010 is a success if I may say so myself and I definitely look forward to BoostCon 2011 for more of the cool C++ community talks.
Update: Due to insistent public demand (and some free time) I’ve updated the links to the sessions. Thanks for the patience guys!



SVN error on Eclipse: org.tigris.subversion.javahl.ClientException: Attempted to lock an already-locked dir
org.tigris.subversion.javahl.ClientException: Attempted to lock an already-locked dir
svn: Working copy ‘D:\htdocs_svn\sites\all\modules’ locked
org.tigris.subversion.javahl.ClientException: Attempted to lock an already-locked dir
svn: Working copy ‘D:\htdocs_svn\sites\all\modules’ locked




We're now an official Google Apps Reseller! Google approached us last year to represent them for Google Apps Premier Edition here in the Philippines. We worked out the details with them for a while but since it fits in with our current skills in developing applications in Google App Engine and Android we decided to take this on.The timing is perfect since Microsoft is currently pushing its 2010 versions of its software like Microsoft Exchange 2010 and Microsoft Sharepoint 2010. Google Apps Premier provides much cheaper alternative to these Microsoft products, plus a lot more features, and a heck of a lot less administrative headaches.
If your organization is looking at updating its email, document-management or collaboration systems, talk to us about the option of Google Apps.
Check out this video to get an Overview of Google Apps for Business.


I use DocProject for automated documentation builds of one of the projects I’m currently involved in. DP takes away much of the manual doc-generation tasks as it provides a VS (Visual Studio) project for the documentation project and is integrated in the project’s solution. This allowed me to incorporate the documentation build as part of project build (using msbuild), which is already integrated in my Hudson deployment
The doc build is not as seamless as it should be and I’ll be highlighting the additional tasks required to build the doc project so you don’t spend half of your day working out the build failures for the last few hours like I did
Environment Variables
Before you push your changes, make sure you add the environment variables DocProjectBuildPath and DocProjectPath in your project’s configuration in Hudson. The value of these two variables can be found in Window’s System Properties. It’s strange that this wasn’t already in the doc project’s documentation. Without these two variables, msbuild will look for the target files in your C:\.
Leading dot (.)
I started Hudson with a default configuration – with HUDSON_HOME pointing to ~/.hudson. That shouldn’t be a problem but one of the build steps (there are 12 steps!) to build the doc project involved generating a .chm file for Help 1.x. Who would’ve thought that you’re not allowed to have dots (.) in front of your folders? Moving my HUDSON_HOME to something more sane fixed it for me.
Posted via web from .plan

