16 Aug 2016
If there's one thing I really like in read more →
nodejs is how it loads dependencies.
Each dependency is loaded relatively from the current file or from a known path (usually
Unfortunately in java things are much messier. Today I will show how you can create a folder named
java_modules that acts similarly to
15 Aug 2016
Previously I wrote about how to setup a static website with metalsmith.read more →
Today, I will describe how you can add dynamic and persistent content to your static website using firebase
30 Jul 2016
Recently, everywhere I look, I see Typescript.read more →
The web is full of tutorials about the Typescript language and discussion around it.
24 Jul 2016
Java is moving towards the micro lib world.read more →
For some unknown reason it is called
I guess it is because Java can only have frameworks and no libraries..
The web is full with info about blogs about it and new micro libraries (frameworks!):
14 Jul 2016
Over the years I have maintained a technical blog on blogger.read more →
However, blogger's interface is not so friendly for technical writing.
12 Oct 2015
5 lines of code in angular written once can affect your entire project by auto releasing resources and cancel delayed action after navigating away from the page.
in this post i will explore and explain the problem and its solutions.read more →
20 Dec 2014
If there's anything I hate in the programming world, is when something that worked well suddenly breaks.
Unfortunately, today it happens a lot since everything is a "service" that is upgraded under your feet.read more →
My build process broke so many times, I lost count.
Even if you keep it simple like
29 Oct 2014
every project i've been in so far had the same stupid bug with read more →
at the beginning someone got a string instead of an object and they used
JSON.parse to convert it to an object.
then after a while, someone fixed it upstream, and now
JSON.parse is getting an object and fails with a very cryptic error message.
22 Oct 2014
before we reach the final part of hooking it all together there are 2 seo things we should do.read more →
the first one is to add
index.html to your path.
it will make your life easier handling redirects and default index page etc..
it is not a requirement, but i recommend it and i assume you applied this in the rest of the post.
plus - developers are not usually aware of this, but not specifying index.html will cause problems when deadling with iframes.
i am not going to dwell on this here, but only mention that i had 2 iframes in my application that did not work until i added
index.html to the src attribute.
15 Oct 2014
so now that we know how to generate a prerendered version of a page using phantomjsread more →
all we need to is to identify a crawler and redirect them to the prerendered version.
turns out this is the tricky part..
08 Oct 2014
phantomjs is a browser that runs in the memory (no graphics required).read more →
you install it by running
npm -g install phantomjs and then verify it is available by running
01 Oct 2014
when i was asked about how to make an angular site seo friendly, i was shocked to discover that
where values should be, making your search result display as
05 Nov 2013
Recently I started using node and with it yo, grunt and bower. It is nice to get a quick kickstart. But now when I have to add/modify something in the build process, I get stumped a lot.read more →
28 Oct 2013
NodeJS is great but it lacks settings/configuration mechanisms.read more →
Actually - I understand why it lacks it - configuration nowadays is written in JSON anyway.. so in node you just import it..
But there are some features you still want/need that do not exist yet.
21 Oct 2013
Running Play!Framework (I am using 2.0.4) with Sass plugin throws a read more →
14 Oct 2013
Play!Framework 1.0 had a nasty configuration mechanism.read more →
To make a long story short - it was a properties file.
Play!Framework 2.0 came out, and even though the configuration section
got some big improvements, there are still things that annoy me.
In this post I will show you what annoys me and how to resolve it.
07 Oct 2013
This is another post in our "Selenium Extension Library" serie.
In this post we will fix our IFrame support so that we support IFrames that are in other IFrames.
Previously we:read more →
30 Sep 2013
So far we have written a nifty selenium extension library that allows you to treat the pages as if they were built by components rather than the primitive WebElement.read more →
This brought your page design and development closer to your Selenium test code.
It also allows you a high abstraction and re-usability of your test code which is always good.
25 Sep 2013
My last post was about how we can easily correct the faults in Selenium's Page Model
by constructing smarter components that can expose better API than WebElement.read more →
We got rid of the impotency of the WebElement class by writing our own Decorator and Locator
and thus allowing ourselves to define Components that wrap WebElement in the most natural way you can think.
As an example, we showed a better way to implement a Select rather than exposing some utility function as proposed by Selenium.
09 Sep 2013
Recently I am occupied by automations.
I want to upgrade and troubleshoot as automatically as possible.read more →
If my backend needs a reboot for some odd reason, I want it to be available from some CI tool.
12 Aug 2013
previously we saw some limitations Selenium has.
One of those points was that we are bound to "WebElement" and we cannot define and use "complex" like "select" and invoke "getOptions" on it.
Today, our wishes will become true.read more →
We will need a page to test on.
I chose the this page.
So lets add a select box with id "testme" and 2 options
06 Aug 2013
As AngularJS becomes more popular, the demand for features increases immensely.
While chart libraries and effects support take shape, quick fix solutions are useful.read more →
29 Jul 2013
Recently I wanted to do a zigzag header/footer since it is so modern.read more →
I decided to implement it with pure CSS.
I quickly found out a solution over at stackoverflow.
However that solution was only for zigzag facing down.
I decided to enhance the solution, implement it as a mixin in SCSS,
and get the color as parameter.
22 Jul 2013
So far we have a table where we can select the columns, search the content and pagination where we select the page size.read more →
Believe it or not, but the entire code (HTML+CSS+JS) is no longer than 200 lines - without using plugins!
15 Jul 2013
So far we have pagination, and the ability to select the table headers.read more →
We can also change the page size.
Today, we will add "search" to the table.
So far we implemented everything on the client side - which means we get all the data and we manipulate it.
When dealing with a lot of data, you will prefer to move this to the server side - just like the pagination.
08 Jul 2013
In the previous posts we implemented a simple paging for a tableread more →
using AngularJS directive and filter.
In this post, we will add a feature that enables us to choose which
columns we show.
The template we are using ( See first post)
already places the available headers on the scope.
01 Jul 2013
This is the second part of a serie about AngularJS super table directives
where we add "paging" and "search" and "sort" to a table in a highlyread more →
reusable, customizable way.
So far we have a directive that adds "prev" and "next" buttons.
This directive handles disable/enable on the button.
24 Jun 2013
In this post and the next one I will show you how to write
a directive that adds paging to your table using AngularJS.read more →
Thanks to AngularJS great structure, all code is reusable and activated
as easily as adding a class!
18 Jun 2013
AngularJS is GREAT!
you should neglect whatever framework you are using right now,
and switch to AngularJS immediately!read more →
20 May 2013
For a while now I've been trying to figure out an exception I got using EBean and Play!Framework.
I know what OptimisticLockException, and I know why it usually happens, but nothing matched my scenario.read more →
Today I had an enlightenment and I managed to resolve the exception. Thought I'd share.
13 May 2013
In this post I will talk about an annoying limitation Selenium presents,
and in the next posts I will show how to enhance Selenium to support my wish list.read more →
06 May 2013
Your first step would be to include the JS file and then add dependency on cookie module. read more →
15 Apr 2013
So it is late at night, and I am working over the weekend again..read more →
Creating a OneToOne relationship with EBean and exporting schema to create schema upgrade script
when all of a sudden, I get an exception I have never seen before.
Since it took me a couple of minutes to figure it out - maybe too late at night? - I decided to post
the problem and the solution.
08 Apr 2013
A long time ago I wrote a post about how to remove background from images using 2 simple commands with imagemagick.
Recently, I acquired a new computer, and I had to download imagemagick again.read more →
Obviously, I went to my blog to remember the commands I used, and I copy-pasted them, only to discover they do not work!
01 Apr 2013
If you have a lot of static files (images, JS, css) in your WAR,read more →
Or maybe you have static files that are shared between different projects
you might want to pack those resources into a JAR and serve them from there.
25 Mar 2013
Recently I added spring MVC to an existing project using Jetty.
Like all projects, I wanted this one to support DEV mode and PROD mode.read more →
It is a Spring best practice to keep 2 context files (at least).
One file for Spring MVC controllers and stuff,
and the other for beans that can be used outside Spring MVC and reusable everywhere.
11 Mar 2013
Last time I wrote about how to setup a Maven Project with SLF4J using Logback.
In this post I will explain how to do the same for Play!Framework 2.0. read more →
08 Mar 2013
In a previous post Being Your Own Rest Client
I explained how REST and API are 2 different thingsread more →
and using REST API from your front-end is not really recommended
I know that CORS is already here and this is the way to go,
but I find something so appealing in postMessage that I just can't let it go.
This seems very powerful to me.
Using postMessage also forces the API to be in a DOM environment.
I wonder which cool usages this will bring with it.
05 Mar 2013
I recently started migrating my projects to SLF4J.
SLF4J is a single API for all logger implementations.read more →
There are at least 3 implementations I know about:
19 Feb 2013
In my previous post I talked about HTML5 - cross domain messaging with postMessage. I showed how to use a JQuery plugin written by Ben Alman that wraps this method and falls back on hash tags
in the URL for older browsers.read more →
In this post I will talk about how to improve the usage in this plugin to support multiple messages
from different origins.
12 Feb 2013
read more →
passing messages across domains.
Now it is easy to send and receive messages to and from an
and define a messages whitelist keeping your frame safe from evil messages.
06 Feb 2013
REST and API are two words that got stuck together.read more →
Using REST between your client and server is one things.
Exposing an API - be it REST or not - is a different thing.
Thinking these are the same thing is a mistake I see a lot lately.
29 Jan 2013
Every now and then you get to show HTML in a textarea.read more →
A common usage for this would be to copy some HTML code you should embed in your site
22 Jan 2013
I recommend Sublime Text Editor.read more →
It has some really nice and strong features, and it has a lot of extensions.
Extensions in Sublime is called a "package" I think... but I will call it "extension".
You'll just need to cope with that.
16 Jan 2013
I just migrated from Java+Play1.0 to Java+Play2.0 and the templates are the hardest part so far, and the best way I found to implement a base template (for title, head etc..) is by using the Http.Context. There is a very nice syntax you can achieve with tags.read more →
08 Jan 2013
Even though I don't support working from the IDE, I have to give support to developers that do.read more →
For example, when I assimilate Maven into the project, I must make sure all workspaces adjust accordingly.
Even though Maven has support for ".project" file auto-generation, there are still so many problems along the way that I have to sit down with each and help resolve all the issues.
In the last project, I assimilated Maven into a GWT project.
This project has dependencies of GWT module type.
These dependencies are simple jars, however, GWT compiler needs their sources in order to use them later on.
All in all I came across 7 different problems. I will show you how I resolved 4 problems
The other problems are related to GWT not synchronizing with Maven.
It is important to note, I did not come across any problems while working with Intellij. Intellij's approach is to enable console commands from the IDE, while Eclipse's approach is to hide Maven in the background. This is the main reason why Intellij introduces less problems.
01 Jan 2013
I found 2 reasons that cause this error in Eclipse. read more →
25 Dec 2012
I defined a custom local repository for Maven, but eclipse simply ignored it.
You can define local repository location easily by modifying read more →
This resulted in a strange behavior. The commands were successful when running from command line but failed on missing artifacts from Eclipse.
Eclipse complained about missing artifacts, but when I check, I saw they were there.
18 Dec 2012
I recently joined a Play!Framework 2.X project.
After 2 years developing with Play!Framework 1.X, it is certainly a big difference.read more →
One of the things I miss most is the nice migrate module.
2.x has something called evolutions, which might be as powerful, but I really didn't like it
So I decided to write my own simple migrate module.
Since I didn't have the motivation to learn how to write a module for Play 2, I decided to implement it with a simple Shell script.
21 Nov 2012
When I followed tutorials and guides for using Maven Jetty Pluginread more →
I kept seeing the same instructions saying:
20 Nov 2012
Sublime Text Editor is a great new text editor.read more →
Its motto is "The Text Editor You'll Fall In Love With" and indeed I did.
I have been a notepad++ user for a long time, but I think I will make the switch.
I find it so useful, I am even writing this very post in sublime.
Later I will copy-paste the content to Blogger.
Wouldn't it be great to have an add-on to sublime though that would work with Blogger?
13 Nov 2012
try running the following query on a MYSQL instance running on windows read more →
06 Nov 2012
So I am writing an application in Play 1.2.1
And I want to use the cool migrate module. This means I need to start writing SQL now.read more →
And I am bad at it.. Sometimes I forget to put "OneToOne" and it takes me a while to see it
I found it useful to tell hibernate to export the DB scheme, thus quickly finding out the problems.
For this post I created the following models
14 Feb 2012
I like Intellij's "live templates" feature and I try to use it as much as possible.read more →
Here some live templates I just can't do without.
11 Jan 2012
I had a problem.. I bought an image from istackphoto.com and I had to use it.
Seems the image was in EPS format and had 17MB !! read more →
26 Nov 2011
Selenium is an automation for GUI testing for Web Applications.read more →
Once you run the automation, a browser popup up, and you will see user action happen on its screen such as :
21 Sep 2011
Today I added "minHeight" feature a JQuery plugin a became quite fond of..
This plugin is called Tiny Scrollbar, and for this post you will need to have a look at the source, as I am going to modify it just a bit, while adding a powerful feature. read more →
08 Aug 2011
As you probably know, if you want to make a sexy button, you need to implement it with a link.read more →
02 Jul 2011
I recently upgraded to play 1.2.1.read more →
As I was running the tests, I got weird exceptions. That contained strings like :
07 Jun 2011
Finally, one of my mysteries is resolved.read more →
31 May 2011
As I was looking at my blog's search keys that got people here, I noticed a weird oneread more →
30 May 2011
I recently learned how to write to a file in Python, and among it how to use Object Serialization library called "pickle". read more →
15 May 2011
I just discovered something. I have code with @OneToOne mapped to the DB. read more →
21 Feb 2011
I enabled my apache with SSL recently.. Had to change many files.read more →
And once I managed to get SSL working, I noticed my PHP configuration was messed up..
01 Jan 2011
A while ago I had to find a certain date in the database, but the date column was defined as LONG.read more →
I discovered you can easily turn a LONG to a date, using the following syntax :
14 Dec 2010
So I got a project while back that invoked SOAP messages, and I immediately thought about AXIS.read more →
I used AXIS a long time ago.
This time around I decided to use MAVEN to build the project, and as I searched for axis plugins for maven, I was surprised to know I did the wrong search.
21 Oct 2010
I just downloaded nginx for a bug/feature to simulate the production environment, and I immediately got : read more →
28 Sep 2010
I have worked with hibernate now for 6 years. and yet..read more →
21 Aug 2010
I always forget how to quickly set up log4j in my maven project, even though it is really easy. read more →
03 Aug 2010
On my previous post I introduce some advanced things about generics, when I discovered I forgot a very important feature. read more →
03 Jul 2010
I am living on the edge, working with rails 2.3.4.. As I am moving to production, I decided to integrate with "exception_notification" gem. (or plugin?) , and that's after looking at Ryan's RailsCasts that I love. read more →
12 Jun 2010
Some stuff I picked up about rails that I wanted to shareread more →
27 Apr 2010
Last time I explained how I got my Apache to forward calls to the SVN.read more →
It was pretty hard due to lack of documentation.
20 Apr 2010
So I am working on a small project to exercise my new Rails brain muscles. And just as I start to feel good, I run into a problem. read more →
10 Apr 2010
Well... I am a bit frustrated.. read more →
05 Apr 2010
OK. So I went cover to cover for the second time over the agile web development with rails read more →
03 Apr 2010
As I am going over the rails book - I reached the I18N section.read more →
This section required me to upgrade from 2.0.2 to 2.2 or above.
I upgraded to 2.3.4 - while the book uses version 2.3.4.
17 Mar 2010
final is a very intuitive keyword, and even though I use it a lot, I never really took the time to ponder about it. Today is a good day for pondering.. . read more →
12 Mar 2010
In a previous entry I explained how I always get asked the same SQL questions in interviews. Lo and behold, I am asked the very same questions in an interview I had just the other day.read more →
09 Mar 2010
What I wrote here - you won't find in the links below, but if you are looking for tutorials try these cool articles I found read more →
09 Mar 2010
In Java/Tomcat I have a web.xml to define a "welcome-page" which usually points to some index.jsp. This means that if my root URL is http://www.mograbi.co.il/guy_mograbi
it will show the page http://www.mograbi.co.il/guy_mograbi/index.jsp . read more →
20 Oct 2009
ASM - allows you to generate byte code at runtime.read more →
It might not mean much to you at the moment, but this is a strong ability.
For example - this ability allowed the creation of the Groovy language.