Difference between matching and simple Git push

Posted 2013/12/31 by miroadamy
Categories: programming

Tags:

See https://github.com/radegast/miroadamy-dot-com/wiki/Difference-between-matching-and-simple—Git-push

Binding DashDoc with editors and Eclipse

Posted 2013/12/31 by miroadamy
Categories: Mac

Tags: , ,

See https://github.com/radegast/miroadamy-dot-com/wiki/Binding-DashDoc-with-editors-and-Eclipse

Miro’s World 2.0

Posted 2013/12/31 by miroadamy
Categories: blog

https://github.com/radegast/miroadamy-dot-com/wiki

The continuation of the old WordPress blog with more agreeable tools: Github Wiki + Gollum, Markdown and Git.

 

Tomcat 5 not reloading changes in JSP

Posted 2011/07/24 by miroadamy
Categories: Java, OpenSource

Tags: , ,

Part of the beauty of JSP development is the easy of trying out the change. All you have to do is edit the JSP file, save it and reload the page. Yesterday I got caught by surprise by not being able to do exactly that.

I saw some strange behaviour in an EL expression used JSP tag. As it was nothing ATG specific, I decided to try it out in plain old Tomcat rather than full ATG application. So I located the instance of Tomcat 5.5 (I always have couple of Tomcats lying around) and being lazy, I decided to inject the change into out-of the box jsp-examples Web application that comes with it.

I picked a victim JSP to be modified (jsp2/el/basic-comparison.jsp), made my change, reloaded page – nothing. I must have forgotten to save the file, did it again – nothing. Weird. Maybe browser caching. Cmd-Shift-R – nothing. Tried different browser – it showed unchanged file as before. Definitely not a browser issue.

The most logical explanation would be that I am editing different file than reloading: so I verified that the JSP file I edited is indeed under WebApps, that correct version of Tomcat was started. It was. There was no context redirection in place but to be sure, I unzipped pristine copy of apache-tomcat-5.5.31.zip (I have couple of those around as well), copied the JSP there, started it – same thing.

Really weird.

Few more experiments showed that no change to any JSP page under jsp-examples was visible. Removing JSP page caused 404 error as expected, but as soon as the page was there, it reappeared in original pristine version.

At this point, I started to suspect there is something fishy with the jsp-examples application itself. And it was. Brief check of the web.xml showed that it is quite long (24K) and that it contains declaration:

<servlet>
  <servlet-name>org.apache.jsp.jsp2.el.basic_002dcomparisons_jsp</servlet-name>
  <servlet-class>org.apache.jsp.jsp2.el.basic_002dcomparisons_jsp</servlet-class>
</servlet>

....

<servlet-mapping>
  <servlet-name>org.apache.jsp.jsp2.el.basic_002dcomparisons_jsp</servlet-name>
  <url-pattern>/jsp2/el/basic-comparisons.jsp</url-pattern>
</servlet-mapping>

and suddenly it all made sense.

As long as the JSP file was present (Tomcat checks), it’s content was completely ignored and the request for /jsp2/el/basic-comparisons.jsp was served by COMPILED class /webapps/jsp-examples/WEB-INF/classes/org/apache/jsp/jsp2/el/basic_002dcomparisons_jsp.class – which of course did not contain any of the JSP file changes. When I removed file, Tomcat reported 404 a- the check for file existence comes before check for URL mapping apparently.

Moral of the story: being lazy causes one has to do more work but often learns something new. Had I created fresh new WebApp, none of these mappings were present and I would never realized what is Tomcat 5 doing behind the scenes.

Btw, in Tomcat 6 the mappings are gone and everything behaves as expected.

Although this is not technically a bug – but a feature – it is unfortunate that this optimization is used exactly in one application that can be used by newbie developer learning JSP for experimentation and not seeing it’s change can confuse the hell out of them. Especially when googling the issue will very likely sending him/her in completely wrong direction – suggesting reconfiguring Jasper, playing with valves and internals of Tomcat configuration.

Google+ is superset of both Facebook and Twitter

Posted 2011/07/11 by miroadamy
Categories: Web 2.0

Tags: , , ,

It may be too early to express opinions about something so new as Google+, but in the short few days I was playing with it, I started to like it a lot. Many bloggers consider it to be a Facebook killer – and it (unlike two previous Google attempts on social networking) eventually may become that. Conceptually, however  it is much closer to Twitter than Facebook.

The biggest difference is that in G+ there is no peer relation – “friendship” that needs to be confirmed by both parties. Both ends are disconnected in Google+ – set of people whose updates you see in your stream and set of people that see your updates is not the same and can be in extreme case disjunct.

In G+, like in Twitter, everybody chooses set of people whose updates you want to see – you “follow” people. This following does not require any approval on their end. Unlike Twitter, you can easily organize the people you follow into groups (circles) and with single click limit the news stream only to members of this group (where one person can be in many groups). It is like having multiple Twitter accounts, each with different set of people followed and switching identities.

On broadcasting side, you can select the target audience for each post by addressing the message to be visible publicly (Twitter default), by any member of your circles, your extended circles (kind of “friends of friends”), one or several named circles, or even named set of people from your circles. Whether your message will actually appear in their message stream depends on whether the addressee did add you into their circles. Twitter does allow you only public updates. (Yes, ok, there are “protected tweets” by who uses them ?). Facebook allows you updates only for all your friends or single FB group.

For example, I have group named Following with members like Andy Ihnatko, Leo Laporte, Leo Babauta and other internet celebrities. Clicking on the circle will show me all public updates from these people, but it would contain none of the posts made e.g. by Andy for his circles – of which I am not member of. Similarly, should I post an update for the “Following” circle, Andy would never see it in his news stream (despite of that I do have him in my circles) as I am not member of his circles. This way Google created incredibly flexible framework that can deliver any mode of communication available from Twitter and Facebook:

1) Twitter following: see above
2) Facebook friends: both parties add the other to circles
3) Facebook groups: named circle (plus possibility of multiple groups and administration that does not suck)
4) Friends of friends: extended circles
5) direct message to person (in your circles): update with single person recipient

What G+ does not have (yet) are applications/games and public developer API. I am pretty sure that promised availability of the later will cause the explosion in the first. It will be very interesting to see the impact of this new, much more flexible “trust model” on the kinds of applications available.

Back to Twitter

Posted 2011/06/19 by miroadamy
Categories: lifehacks

After being away for over 4 months, I am back on Twitter. No, I did not miss the stream of 160 character mixture of news, trivia, white noise and occasional nuggets. Three main reasons:

1) Twitter seems to to become  unavoidable – more and more services assume that one has twitter account. Many cyberevents rules start with “retweet this” or “tweet that” which of course one cannot do without Twitter account

2) Direct messaging via Twitter is one very convenient method how to add information to many service: new todo in Toodledo, Evernote and so on. It is MUCH faster than starting any client on an iPhone.

3) Twitter is after all the best medium for sharing links. Facebook does not cut it  if you want to keep friend count reasonable so there is a gap between Facebook and LinkedIn

Alas, I am back, with my old handle ‘miroadamy’.

Hello – Nael and the gang …

Dear Cultured Code, you are history …

Posted 2011/06/18 by miroadamy
Categories: Apple, lifehacks

I have been Cultured Code customer for over 2 years and used multiple their products: Things on OS-X, Things for iPad and iPhone on daily basis.

Not any more.

I am definitely giving up on Things and Cultured Code products.

The reason why is sheer frustration from long wait on usable synchronization between Things on Mac, iPad and iPhone. Something that have been discussed, promised, chewed over 2 years and that still does not work.

In theory, you *can* synchronize as long as Mac and iPad / iPhone are in the same wireless network and can see each other. Things on Mac must be running and when Things on iPad/iPhone starts, they find each other and exchange data. It works most of the time, until it stops. With a bit of luck and some tweaking, one may be lucky and get it back to working order. Or not.

It happened to me several times that for no particular reason, iPad started the synchronization but never completed. Sometimes restarting iPad or Mac helped. Sometimes not. Sometimes I managed to fix the problem by unregistering the iPad and adding it back. When this remedy failed, in frustration, I tried to contact CC technical support. Here is the answer

Hi,

Thank you for your inquiry.

We are working on our own cloud sync solution that will allow 
for multi-device-sync (Mac / iPhone / iPad) using whatever network is available (Wifi / Edge / 3G). 
See: http://culturedcode.com/status
That's the most requested feature currently. 
At present I can't give you a time frame, 
though, when this is going to be ready.

Regards,

Roman.
Things Support
Cultured Code

They have been working on synchronization for well over 2 years now, if I remember correctly, which is about 18 months too long. What kind of project management is that they still do not have a time frame for completion ? This is not perfectionism, this smells like Cultured Code is another product company that was great once but lost its mojo and capability to deliver. Things may be the most beautifully designed GTD application out there – but how long will pleasure from using shiny toy compensate for lack of basic functionality ?

After reviewing the landscape of GTD apps in 2011 I am now settling on combination of Toodledo and Evernote. Toodledo is basically a Web application with several iPad / iPhone clients. There is probably no OS-X desktop client that would come close to elegance of Things. Yet. And the web UI is kinda busy – but boy, it is *very* *very* functional. The synchronization with iPad works like charm, asynchronously.

And I doubt it took the Toodledo team 24 months to solve …


Follow

Get every new post delivered to your Inbox.