Monday, December 26, 2011

Present from a far away friend

Svetla and I have never met in person, yet from the moment we got acquainted through our blogs I felt a strong connection with her. She has a very unique style that represents traditional Bulgarian design mixed with modern creations and miniatures. I also love her special projects that you can take a look at here, the clock that is on page one reminds me so much of Hugo Cabret!



Svetla creates her own designs with such care, you can never mistake her work with the work of another. Especially because I admire her so much, I am very happy and proud to own some of her creations. Svetla was so incredibly nice to send me and my kids gifts, which I just have to share with you. I don't think my pictures do justice to her work, so if you would like to see more of what she has created, please check her blog out. 



This is what she sent me:


Present201102


Just look at these beautiful notebooks and the frock shaped card
Present201106 


A Bulgarian martenici card
Present201107


A paper purse with a small handmade notebook and a card
Present201105


Svetla was also so kind to send me extra materials to make my own crafts
Present201104


Thank you, Svetla, for the wonderful gifts and I hope soon to return the favor!



Annie

Thursday, December 1, 2011

Ad-Hockery functional testing : UI Elements and Selenium experience

This post is a response to Rob's posting on functional testing that just became too long to post in a comment...

-----------
At my job, we've used the UI elements approach pretty extensively and at this time we're moving away from it on a new project.

Conceptually, I've also enjoyed the idea that the location logic is sitting in the same tier as the elements that are being located. The support in S-IDE is also quite nice and impressive (e.g. code completion, documentation), the built-in support for unit testing the locators is quite nice.

Now, the downsides....

  • UI Elements development / future : although it is technically a part of Selenium, in practice UI Elements support don't actually evolve in lockstep with it. On a conference call/presentation w/ one of Selenium's maintainers a few months ago, when I asked about UI elements, he indicated that they might be moved out of the core (he didn't seem to be particularly fond of them, I almost had the feeling that he was tempted to just drop the feature). There isn't much of a community using them in the first place, thus if something breaks they can remain broken for a while until someone notices (when that happened to us, the turnaround was pretty quick; although I'm not sure if that is the way it is or because the author of UI elements for Selenium was a former employee).

  • The skills gap : the fact that the UI element definitions are defined outside the main "test case authoring" environment (which in our case is Groovy), makes it another distinct skill that team members (often QA folks) need to acquire. When it comes to Javascript, being a user is easy, being an author who can sling Javascript and write nifty unit tests (typically not a QA skillset) inside of the UI elements is not that easy. At least in our case it led to a bunch of not very well maintained UI Elements, w/ most of the Unit tests commented out and the knowledge of writing UI Elements withing the QA team considered almost a Dark Art. As a result of all this

  • Development cadence issues : although the usage of UI elements in a test case seems very sexy, the same "development cadence" for UI Elements is kinda slow (this could be my own ignorance as well). Basically, if you wanted to enhance a UI element, you would write some Javascript to set up the UI Element definitions and then close S-IDE and open it up again. If your unit test failed, then you would get a bunch of popups about the failing tests, the UI Elements would be disabled and you're back to editing the javascript file until the unit test passes. Only after that, you can try using the UI element in S-IDE or in your test case. Finally, if you were using selenium-server to run your "real" test cases (like we did), you need to restart selenium server (RC) so that it can pick up the updated UI Elements.

  • UI Element organization : this could be an artifact of our own failings w/ UI elements and not necessarily a problem w/ the framework itself; however, the lack of a well defined approach to structuring them has led us into a massive set of pagesets that contains UI elements for a whole bunch of different pages. Thus, when you try to pick up a UI element there isn't a good organizing principle ("Oh, yeah, I'm on the Login page, lemme see what I can locate there") - instead we have something along the lines of ("I'm in feature 'foo', let me see which one of the several hundred UI element in the fooFeaturePageSet might fit").





Although the Page object approach is not a silver bullet it addresses a bunch of the issues above:
  • Skillset - the same skills that test authors use to write test cases, they use to write the abstraction (page objects)
  • A clear organizing principle - people get it, pages have stuff in them, putting the location logic for an element on a page inside of the corresponding page object makes sense. Then, using that is just a method call
  • Deployment / Cadence issues - there is no longer the impedance mismatch of "I want to run this test case, did I re-deploy the UI elements that it depends on?". You just run the test, the testing framework will recompile the modified page objects and the test case runs, no need to do anything w/ Selenium server or anything else.
Anyway, just my 2c on the subject.

Wednesday, November 30, 2011

My Scala (and Tapestry 5) experience

Since both a couple of coworkers asked me about Scala in the last few weeks, I thought these might be interesting to read through (something that emerged over the last few days)

  •  http://codahale.com/downloads/email-to-donald.txt
  •  http://codahale.com/the-rest-of-the-story/


I have obviously not used Scala to the extent that the guy describes, but I can testify at how annoying it is the constant translation between Java and Scala (especially, since my small app, , was using Tapestry 5, which is obviously a Java framework). The conversion between the two was made worse (at least for me, a total Scala newb) by the following:

  • Classes with the same names but completely or subtly different usages and intents . The fact that the Scala library used the same class names as the Java library (java.lang.Long and scala.Long) , the default imports use them, and there are some magical conversions that occur between the eponymous types. On a few occasions I was totally baffled about something not working only to find that in the end, the code was getting the wrong type . Thus, in a bunch of my classes, I ended up explicitly having to import the Java classes that the framework expected to work with , e.g. 
      
    import java.util.{List => JList }
    import org.slf4j.Logger
    import scala.collection.JavaConversions._

    class FooPage {


    @Property
    private var catPieces:JList[ArtPiece] = _


    // explicitly declaring the returning types as the Java types
    def onPassivate():JList[String]= {
    // and using the Scala provided conversions
    return seqAsJavaList(List(category,subCategory))
    }

    }

    and then explicitly use the java specific types. A similar but different situation exists with java.util.List and the scala List classes (e.g.  scala.collections.immutable.List) although they have the same name they have a completely different purpose (e.g. the Scala list is not necessarily intended to be created, and manipulated like the Java list); the equivalent of the java list is the recommended Scala ListBuffer
  • Null handling -  because I was interacting w/ a Java framework, there was an expectation that nulls are OK and at different places, the framework does expect methods to return nulls in order to behave in certain ways. Scala goes for the whole Option pattern (where you aren't supposed to use nulls to make it all better) and has some conversion (that I obviously, don't fully understand) between null and these types. However, because of the interaction w/ the Java framework, I had to learn how to deal with both. It kinda sucked.
  • Tapestry 5 and Scala interactions -  because Tapestry 5 pushes the envelope on being a Java framework w/ a whole bunch of annotation processing, class transformations, etc. , in some cases there were clashes between the T5 approach and Scala. In some respects, Tapestry 5 manages to be a respectable and succinct Java framework by adding a whole bunch of metaprogramming features, which when used with Scala make the scala code less attractive, e.g: 
    • Page properties that would otherwise be set up as private fields in regular Tapestry 5, now have to be declared as private fields and initialized. If you didn't declare them as private, then T5 would complain (since pages can't have non-private members as it is managed by T5) , e.g. :
        
      class Foo {
      @Inject
      var logger:Logger = _

      @Inject
      var pm:PersistenceManager = _
      }
    • Sometimes the T5 and Scala approaches seemed to clash in ways that make things complicated. For example, in the persistent objects in the class, I often annotated the private fields w/ @BeanProperty (so that Scala generates proper getters/setters for those fields).
        
      import scala.reflect.BeanProperty
      import javax.jdo.annotations.Persistent;
      class PersistentFoo {
      @BeanProperty
      @Persistent
      var title = ""

      }
      Yet, when I accidentally did the same for some page properties at weird points the application would start failing (on application reload with Tapestry's live class reloading) until in pages I replaced the approach w/ Tapestry's @Property annotation (although they're supposed to do the same it's quirky w/ BeanProperty)
        
      import org.apache.tapestry5.annotations.Property;

      class FooPage {
      @Property
      private var category:String = _

      }


When I was working on the app, a few times I had to just stop for a day because I couldn't figure out how to do something massively simple (e.g. how to succinctly join a list of Strings into a comma separated string - stuff that would have taken me 30 seconds to do in Java, 2 seconds in Groovy and the proposed Scala solutions seemed like massive overkill). I originally started wanting to write some tests in Scala for this app, because I thought, "wouldn't it be nice to have something a little more flexible and less verbose than Java", but that still has nice static typing. Later I decided to try the whole Scala+T5 approach, and I have to admit I was pretty mad at myself when I would get stuck .

Obviously, many of my problems described above were due to my own weak Scala-foo (e.g. I had read through at least 2-3 books in order to be brave enough to try this just to learn that until I try things hands on, it doesn't stick too well), and other issues that I had were due to the interaction w/ the specific Java framework that I chose (Tapestry 5). Yet, in some ways, the experience was somewhat disappointing - having worked w/ Groovy for the last few years there is a massive difference in the approaches of the two languages. Where Groovy would often sacrifice some "internal beauty" in order to make a Java developer's life sweet and pleasant, e.g. :

  • Joining a list of strings
     
    [1,2,3].join(",");
  • string formatting using $ inside of strings
     
    "Blah blah $fooVar"
  • Null safe dereference
     
    foo?.bar
... whereas Scala somehow gets stuck in an ideological mode e.g.


One part of my setup that worked very  well and I enjoyed quite a bit was the Continuous Compilation and Tapestry's Live Class Reloading. Whereas for prior Tapestry pure-Java projects I had to rely on IDE magic to do some Compile-on-Save so that Tapestry can reload the changed classes, w/ the Scala setup it was much nicer.  I set up a Maven project w/ the Scala Maven plugin , and then kick off the scala:cc goal  to make it compile the changed page classes into my project. Thus, I had a completely IDE-independent setup that gave me a live-reloading experience on-par (and possibly beyond) the reloading experience with Grails.

In the end, after I managed to work through some of the issues described above, it ended up being a pretty reasonable set up and I was able to make pretty decent progress in getting the app out the door (for my wife's birthday). At the same time, I wasn't really able to leverage any cool Scala features that would magically boost my productivity, or make the codebase significantly cleaner or smaller (in some respects, it feels like the Scala based code is more verbose because of all the conversions and casting into Java types). I feel that if I knew more about Scala and was more knowledgeable about Tapestry internals, I might be able to write a Tapestr5 - Scala adapter layer that would plug into some of T5's extensions points to make it work more naturally with Tapestry (e.g. working w/ Scala lists in views, different handling of null values, etc). As a learning experience - I learned a lot, both about things that were interesting and useful (a bit of functional programming, Java/Scala integration), and some things that I really didn't want to know that much about (how Scala and T5 munge the Java classes to make the things tick).

In any event, the advice to people who like to try this kind of integration would be to allow yourself plenty of time for learning and experimentation w/ Scala and not giving up too early ( as I was almost ready to do on a few occasions). Fanf's blog has a few blog entries and a project on GitHub that is  an excellent starting point.


Tuesday, October 11, 2011

UB Homework

When I first heard that we'll have Photoshop retouch homework I was really happy, because some years ago I was working as Image editor at a modeling agency. Although it was tedious and sometimes boring job ( unless you have five models behind you talking too fast for their own good, "explaining" to you  which part of their body you should fix first) sometimes I miss the " fixing" effect of it.

It would be so easy if we can fix things the way we do with Photoshop, wouldn't it? One brushstroke and 10 lbs from last Christmas are gone. Second brush stroke and your hair is longer...



Anyway, I'm a little rusty with the retouch, but still I think I did OK for not using retouch for 11 years.

What do you think?



Fixing red eyes ( Ok, I added a little extra from me)
redeyes1     redeyes1


Fixing underexposed picture
underexposed    underexposed1


Skin correction and blemishes
skin   skin1


Now here is time to mention that I just got my brand new Lightroom 3 ( Boo-yah) and I'm enjoying it very, very much ! :-)

Do you use retouch for your own pictures?  I honestly don't have time to do that for my own pictures but it's nice to have an idea how to do it, right?

Sunday, August 14, 2011

Update on Niskayuna Art out! WOW!

WOW is really all I can say! I had no idea that our work would be judged so that was a  big surprise, but actually winning 2nd place was even bigger surprise for me! It was really my first time participating in an event like that and getting the 2nd place prize under these circumstances it's pretty good in my book! :-)



Niskayuna Art Out 201125






I won with the woodburned plaque " Niskayuna Train Station" which was my very first woodburned landscape. I had never tried it before and I always found it intimidating so imagine my astonishment when everyone complimented it and then I won the prize with it.

Niskayuna Train Station 201101


I received compliments from the judges for my other work too and that was very uplifting too.  The second reception with media coverage will be on Sept 27th at 6:30 pm in Niskayuna Town Hall, if you would like to join us. Until then all our work will be displayed in Niskayuna Town Hall for sale.



Here are some pictures from the event tonight and a couple of snapshots of my work on display.



Well, congratulations to me and I'll keep you posted on more exciting news! :-)



In case you have missed the other work I created for the event, you can read this post

http://artcraft.anniesartbook.com/2011/08/niskayuna-train-station-art-out-2011.html



Annie

Niskayuna Train Station Art Out 2011

I had absolutely no idea what I'm signing for but I thought that whatever it is, if there is ART and it's OUT( side) it would be fun.

Of course I was right! :-)

I don't remember painting/drawing/woodburning for 2 straight days ever! The only down side was that I actually had to work both days, not like I planned but I managed somehow to survive ( talk about being tired today! Ha!) I met wonderful people aaaaand maybe have some interesting ( ;-) hint, hint) news in the making, will update you when I know more!



Here is everything I managed to make for the 15 hours I spent working on Friday and Saturday:



1. White ink on black background- " Conversation"


Conversation 201102





2 . Ink and Copic markers- " Inside"




Inside 201102

3. Watercolor and Ink - " Journey"


Journey 201101





4.Woodburned plaque- " Niskayuna Train Station Lion's park"


Niskayuna Train Station 201101

5. Woodburning- " Blossom"


Blossom 201101



You can check out more detailed pictures of the artwork if you click on the images.

I feel very satisfied with the amount of work I managed to finish this weekend. I didn't dare hope that I will have so many things, but here they are, speaking for themselves. I hope you enjoy them as I did and if you are interested in purchasing any of them, you can contact me through the Contact page or Facebook for prices, size etc.



Off to enjoy the nice reception at the art show! :-)



Annie



P.S Update- I won 2nd place with the " Niskayuna Train Station" woodburned plaque!! YAY! :-)

Friday, July 29, 2011

Lalaloopsy update

Just a quick update on what I've done in the past couple of days for the Lalaloopsy birthday party I'm planing for my daughter. It wasn't easy but I've found the time somehow...I drew in Corel Painter Essentials the doll, then I colored it. After with the help of the Silhouette software I made different designs, printed them out, then cut them with my digital cutter Silhouette. It took quite a while, since I haven't used the cutter very much and it showed I lacked experience ( which was obvious around the time I asked the kids to go to the other room so I can curse as much as I like and of course by the full recycling bin with papers). At the end I think I did fine. It was interesting enough to keep me busy anyway.


So, the placement cards are done.
Lalaloopsy party decorations02


The special "birthday ribbon"  too.
Lalaloopsy party decorations04


The birthday bags took twice the time, because I had to make two pieces for them - one big image for the package and one small one as a tag with the name of the child. 
Lalaloopsy party decorations05


Did I also mention I did all of the "stitch" work by hand on all of the decorations? Yeah...gimme that crazy mom award!
Lalaloopsy party decorations06


And last but not least, here are the 4 designs for the birthday cards I made:

Lalaloopsy party decorations07





The actual image of the Lalaloopsy doll I printed on a sparkling cream colored paper. Unfortunately on my pictures the image looks just grainy but in person the effect is quite cool.

Lalaloopsy party decorations09





Lalaloopsy party decorations10



I think the stitching added little bit of a lalaloopsy touch that the cards needed before :-)

Lalaloopsy party decorations12





Going into lalaloopsy zone again, see you soon!


Annie




Wednesday, July 27, 2011

Birthday madness

This summer is probably the busiest yet. I can't remember when was the last time when I actually had time to catch my breath. Oh, and I have kids. Not to mention I'm starting school in a month and I'm having second thoughts on how this is going to work out with my schedule. Did I mention I have kids?

Yes...the kids. Well, one of them has a birthday very soon hence, the B-day party planning.

I hate b-day party planning. On my birthday I want to stay as long as I want in bed, to wake up and have my brunch served for me and to spend the afternoon near the pool with a book and a cocktail in hand, thank you very much!



However, my daughter ( Thing 2) has a slightly different idea about the event. She's imagining something in the lines of spending a week making her cake, spending a month preparing the favors, decorations and attire. She also wants HANDMADE invitations (The audacity! Like someone has made them invitations for all of their birthdays. Oh, wait...I did. Bummer. ). And last but not least- the 5 course meal.

Hello?! Working mother here!Adjust your expectations if you please!

Note to self-  that's what happens when you spent the last 10 years at home.



My trusted friend in the next 4 weeks
 Ellie5th Birthday preparations 13





So, after a long deliberation we were set on a date and place( that thankfully provided all of the above, minus the handmade invitations). That place was( please note the past tense) going to cost me half an arm and half a leg, but if I didn't have to spend the next 3 weeks bending over backwards to work as a cake shop, Party city, Michales, Perfect maid cleaning service and  Bozo the clown entertainment I was all for it.



But I just knew it's too good to be true. It turned out they don't allow pinatas at the facility and this is something my daughter absolutely positively cannot live without! Right.

So we are having the party at home. Again. Great.



At least I was hoping there would be some ready made decorations etc to use. Nope. She choose as a theme Lalaloopsy dolls ( damn these button eyed chicks) and so far...I'll have to make the invitations, decorations, cake and games. I AM NOT making the food! For now. Ask me again in 3 weeks. No, even better, ask me the day before.



The conclusion....I started working on the project. The earlier the better if you ask me, considering I can't work on it every day. Sigh.



The doll that is in the center of it all is this one ( which is already ordered and shipped) and everything will match her "character". Oh, and the other great thing- the kids invited vary from 3 to 15 years old, so the art project we are doing has to be fun for every one.

Fun. Fun. Fun.

Anyway, if you are up to seeing work in progress, here are some of the things I'm working on.



Centerpieces 
 I calculated that each piece costs approximately $2. I made them from Styrofoam balls, wooden rods ( for cakes) 0.28c glass bottles and I bought 1 large Hawaian flower garland from Party City for 2.50. I made all 3 purple centerpieces with it. The pink garland was $1 and I made 2 pink ones from it.
Ellie5th Birthday preparations 09


I have seen people refer to these as flowers, fans and/or lanterns. Whatever they are, I think they are pretty cool. I was working on them last night just before I went to bed at 9 pm ( yeah, some of us wake up at 4:30am) but I have more to do. 
Ellie5th Birthday preparations 11 
 Considering they are made out of tissue paper + string+ ribbon, they cost around $2 a piece too.
Ellie5th Birthday preparations 01


Decorations
Ellie5th Birthday preparations 15
My favorite part, I can't wait to use these!
Ellie5th Birthday preparations 16


Ribbon and balloons 
Ellie5th Birthday preparations 17    Ellie5th Birthday preparations 18


The craft supplies
Ellie5th Birthday preparations 20


Wish me luck!


Annie

Friday, June 17, 2011

Present ideas for teachers

Have you woken up on the night before the first day( or the last day) of school realizing that tomorrow is the day you were supposed to prepare something for your child's teacher?
Have you ever browsed mindlessly through the store looking for the perfect teacher present that won't be thrown away as useless?


I have !


So each year I post a couple of ideas that I hope will help other parents and save them the frustration in trying to make their children's teachers happy.


This year our theme was " Chinese"( I make up the themes, in case you are wondering), so here is what I came up with:
End of the year teacherpresent 01




The gift set included: 
- a reusable tote bag
- a matching refrigerator magnet notebook
- a matching color bamboo mat
-a small matching print soy sauce dish
- a small wooden scroll box 
- a noodle bowl ( which were actually ice cream bowls, but they were the perfect shape and size for noodles) 
- a matching fancy chopsticks
- a "scroll" with a recipe for " Longevity noodles" and a thank you note on the back




End of the year teacherpresent 04


All of the chopsticks had different designs on the handles. I must say for the price of the set, these were pretty impressive quality.
End of the year teacherpresent 05


And here are the bags packed and ready to go. I don't have pictures of all the designs, but they matched the bags pattern.


End of the year teacherpresent 08


In case this is not your type of teacher present idea, you might want to check out these posts:


I hope these ideas help to make the last last days of school more bearable for you by giving you ideas for the perfect present for the perfect teacher! 
Have a sunny Summer, my friends!
Annie

Tuesday, June 14, 2011

Grails, Web Flows, and redirecting out

If you read the Grails Web Flow documentation it all seems pretty straightforward - start,end states, transitions, actions, events, it's all good. However, just like any other technology that seems like magic, there always is some kind of a catch once you start using it.

One of the little 'gotchas' that I ran into was how to properly complete the flow. Now, reading up the documentation, it would seem easy - at the end of your wizard/flow, you just redirect to a different controller+action and it's all good. It all makes sense - often time, the wizard walks through multiple steps, collects some information, and when it's all done (you save your brand new Foo), you can just redirect to the details page for foo (e.g. /foo/show/1).

Well you thought it would be that easy. Not that quick...

The Grails web flow documentation is kinda deceptive like that. It shows you a simplistic example that works; however, when you try to do something more realistic, then you start getting into trouble. So, the example form the docs looks like this:

  def fooFlow = { 
def startState { }

def endState {
redirect(controller:'foo', action:'bar')
}

}

The catch is that in their examples, the redirect is to a static URL that doesn't take any parameters.The problem comes up when in the end state you try to pass in some parameter from the flow (e.g. which often is the case e.g. at the end of the flow you want to display the details page (e.g. redirect(controller:'foo', action:'bar', id:flow.fooId) . The problem manifests itself in a weird way - the web flow would store a particular value of flow property( e.g. flow.fooId (under onditions that I couldn't figure out), and even though your current wizard might have stored a particular value from the current flow, for whatever reason it ends up redirecting to a value stored from a previous flow. So, the wizard 'kinda' worked in that it redirected to a details page at the end of the wizard, but in a large percentage of the time, it would redirect to the wrong details page. From what I could gather, the issue is that in the end state, the redirect cannot use any values from the flow, session, or flash and as a result uses some cached value (possibly from the first flow execution)

The solution to this (which is somewhere on the Grails mailing lists) is as follows: add an explicit empty "end" state (including an empty gsp to match the end state name), and in the states that transition into the end flow, issue the redirect from the penultimate state, e.g.


def fooFlow = {
def startState { }

def beforeEnd {
action {
redirect(controller:'foo', action:'bar', id:flow.fooId)
}
on("success").to "end"
}

def end(
/** note that this requries an end.gsp to be present
in the flow subdirectory, but it never gets rendered after the
redirect **/
)
}

Now, with this trick at hand, the end.gsp never gets rendered, and the client browsers do get redirected to the detail pages that you want to display, outside of your web flow.

As a more Web Flow centric alternative, you could always store the relevant object (Foo) inside the flow and display any relevant details about the object in the end state (end.gsp)

The Forgotten " Kiara"

After spending an amazing Saturday at the SCBWI conference in Fishkill, I realized that I didn't post anything last week. I thought I did, but I guess having a girl with 105 F fever didn't help my memory either. So, before I forget again, here is the last of the gift sets that I started posting in April. Although I did forget about this set, it's one of my favorite, I hope you enjoy it too!

"Kiara" gift set


The gift set consists of a jewelry box and a greeting card. 
"Kiara" necklace gift box



"Kiara" card

Soon all of these would be available in the store I am planing to open. 


Ta-ta for now,
Annie

Popular Posts

Related Posts with Thumbnails