Skip to Content

Samer Sadek's blog

Hibernate NonUniqueObjectException

I was getting a hibernate error nonuniqueObjectexception. This happened when CF sends flex the same object twice (the first is an object, the second is a reference to that object).
Found this link
http://groups.google.com/group/cf-orm-dev/browse_thread/thread/36c5543b0...
and I replaced entitysave with entitymerge. This solved it for me.
Anyway, just thought I'd share....

Hibernate NonUniqueObjectException

I was getting a hibernate error nonuniqueObjectexception. This happened when CF sends flex the same object twice (the first is an object, the second is a reference to that object).
Found this link
http://groups.google.com/group/cf-orm-dev/browse_thread/thread/36c5543b0...
and I replaced entitysave with entitymerge. This solved it for me.
Anyway, just thought I'd share....

My Technical Podcasts

I have a long commute, and I often listen to podcasts. I thought I'd share what I listen to, and a quick note about a few of them.

  • CF conversations: I think this is the oldest ColdFusion podcast. The host, Brian Meloche had stopped recording for a while, but is now back. Sometimes the sound is not the greatest, but it has improved lately. Interviews are with one or more guests, often in the form of a round table discussion, and are about a framework or methodology.
  • CfHour(): Michael Sean Becker and Dave Ferguson discuss ColdFusion and related topics. When they talk technology, it's good and interesting, but they wander sometimes into random topics. I know most people find these stories interesting and a nice break from all the geek talk, but I, personally, am not interested in how to kill a fly like a ninja or how to make a celeb follow me on twitter.
  • Chariot Tech Cast: This podcasts expands my horizons beyond my ColdFusion/flex cocoon. Topics include Eclipse, Ruby on Rails, Java, HTML5 and many many more.
  • Cloud Computing Podcast: I listen to this sometimes, just to try and stay up to date. Sometimes there are parts that I do not understand, but at least I hear the new buzz words and get a feel about the topics being discussed in the cloud computing world.
  • Digital Planet: I listen to this just because I like the bbc show Click, and this is a sister podcast. It's not really a technical podcast, it's more about how technology affects our society. I listen to it when I feel like something light that I do not need to focus on.
  • The Flex Show: As far as I know, this is the only pure flex podcast. Usually in the form of an interview, John Wilker and Jeffrey Houser have a chat with a guest who is an expert about some flex-related topic. They also have every now and then a 'news' episode where, instead of a guest interview, they chat about the latest flex-related news. If you are a flex developer, you should listen to it.
  • InsideRIA: Good show, with a lot of useful information. But, just like the cfhour podcast, I prefer podcasts that get straight to the point, dive right away into the geekiness. This show contains a bit more humor and entertainment.
  • RIA Weekly: A very good podcast, also usually an interview on a wide range of topics. What is also great about it is that they post the transcript of the podcast on their website, so if you do not have time to listen to it, you can read it or if you need to come back and revisit something, it is there for you.
  • RIA Podcast: This is my favorite podcast. These guys get straight to the point, talk about interesting topics, and the sound is usually good. If you are only going to listen to one podcast, I'd recommend this one.

All these are free, and I imagine take a very long time to prepare, record, edit, post. The developers of these podcasts (podcasters?) do this on their spare time and spend a lot of money on equipment. So to all podcasters, thank you so much for sharing the knowledge.

Speaking at 360 Flex

I will be speaking at 360 flex. If you don't know, 360 flex is in DC this fall (Sep19th-22). I will be giving a talk about Flex and CouchDB. CouchDB is an interesting new way of thinking about database. If you register using this link, I get a few points, enough to buy you a beer.
I plan on giving this talk to our user flex DC user group on Wednesday the 4th.

Windows Mobile

I have always been a PC person. I’ve always used Microsoft products. My first programming language was VBScript. I like Windows 7. I even liked Vista (after SP2). More important, I have a lot of respect and admiration to Bill Gates and what he is doing on a humanitarian level with his Gates foundation. This guy single handedly is saving more lives and doing more good than millions of us put together.

And I am not a big Apple fan. True, some of their products are very creative and explore new boundaries, but I do not find Macs as intuitive as everybody says they are. It took me a long time to get know how to use iTunes (as opposed to Windows Media Player 11 that I love). And without getting into the Apple/Adobe issue here, I am annoyed by this closed iTunes store model. There is something to be said for the more open Windows model, even if you end up with a lot of junk. (And seriously, it's about time for a right mouse click instead of the 2 finger backslide touch with a double flip reverse).

So when I was shopping for a new phone, I decided to give Windows Mobile a chance. I am with AT&T, so I got the HTC tilt 2. The phone has some neat features: The keyboard is very practical. I liked the little vibrate effect when I typed a letter. The camera is good. The processor is OK. The speaker phone is the best I have ever seen. But the OS was lagging. The programs are in three different locations and it is not easy figuring out which program is where and why. Syncing it was a pain even when I used windows mobile. Then it took me two hours to sync it with my Google calendar, and there was still an error message that I ignored at the end. It froze three or four times during the three short weeks that I owned it. In general the experience was unsatisfactory.

Come on Microsoft! I am rooting for you! Good job on Windows 7. MSSQL is a good database. SharePoint is doing very well (for some reason that I still cannot understand), and Google docs is not making a big dent in Office (I know I am comparing apples and oranges, sort of). But building an operating system is your bread and butter. If you do not have a good OS, nothing else matters. Why are you spending time and money on office mobile if the OS that it is running on still needs a lot of work?

I am returning it tomorrow and will give an Android a shot.

The future of databases

How will our IT industry look like in 5-7 years? I have no idea, I am sure it will look very different, and I would not be surprised if I am not using any of the tools that I am using today.

One of the things that will change the most is the way we store data. Relational databases as we know them will not disappear but will have a lot of competitors. What is known as the noSQL movement is gaining track. So what is this noSQL movement about? Think about a blog post. It has a title, body, date, some tags, and some comments. All these are related to each other, but not much to the next blog. So instead of tables with rows, we would have what is called domains. Each domain would contain everything you need to know about that blog post. Yes, that means that something like tags would be duplicates and would exist in multiple domains, but that’s not a big deal: Space is abundant and cheap these days. But the advantage is that this is such a simpler model. Just one envelope that contains everything about this blog, then the next, then the next… Scaling is so much easier. This is not to say that this would work best in any system, but for some system that might grow to terabytes and petabytes, this might be a good option.
I am going to blog soon showing some couchDb code that I have been playing with. Anyway, all this is in the future. For now, I need to go write some stored procedures.
Here is a good article to read: http://www.readwriteweb.com/enterprise/2009/02/is-the-relational-databas...

NCDevCon2010: A Great success

I just came back from NCDevCon2010. Thanks for the organization committee, especially Dan Wison and Jim Priest, who did a great job. I gave two presentations there: Air Desktop Capabilities and Writting readable code.
Thanks also for all who attended my talks. Here they are attached. And here are the recordings of these talks.
Desktop Capabilities
Writing readable code

ApplicationName

I just noticed this for the first time. As we all know, each cf application should have a name, and ColdFusion allows one application per server not to have a name. If more than one application does not have a name, scopes can start getting mixed and you can get weird unexplained results (trust me, I speak from experience)
You set the application name like this:

 

	this.name = "myApplication";

However, when you dump the application scope, the variable is applicationname, not name.
Am I the only one who finds this strange?

Capital Area Flex User Group Meeting Wednesday May 5th

The next Capital Area Flex User Group meeting is Wednesday, May 5th starting at 6:00 pm. Please note we are meeting in a different location, see below.

Christian Cantrell from Adobe will be presenting:
Adaptive Application Development: Writing One Application That Runs Everywhere
Christian will demonstrate how to write an application that can run on seven different platforms including: Windows, Max, Linux, Web Browser, iPhone, iPad, and Android based phones.

This is a popular topic and I anticipate a high turnout for the meeting so I have arranged for space at a hotel near the metro. The meeting will take place at:
The Legacy Hotel
1775 Rockville Pike
Rockville MD 20852

The hotel is near the Twinbrook metro station in Rockville across 355. The hotel won’t let us bring our own food and their catering service is expensive, so we are going to walk over to a pizza place nearby for some food and social time after the meeting.

It looks like we have found meeting space in Virginia. If everything works out the June meeting will take place in Chantilly Virginia. Hopefully this will cut down on the commute time for those people who live in Virginia and allow other people to attend to the meetings. The current plan is to alternate months between Maryland and Virginia, but we’ll see how things pan out.

If you can't make it to the meeting you can still participate online through Adobe Connect at the following URL: http://adobechats.adobe.acrobat.com/capfug0510/

The meeting starts at 6:00 and presentations will begin promptly at 6:30pm. For directions and more information visit www.dc-flex.org

FlexFormatter Quick Review

I recently heard about Flex Formatter on the flexshow podcast . It is a tool that formats AS and MXML code, making a lot easier to read and follow. There is a doc describing how to use it here , but this is my quick review.
Installation, just like most eclipse plugins, is extremely simple. Just add the jar file to the eclipse plugins directory and restart. That’s it, you are ready to go. One of the first things you need to do is play with the options to customize it. Under windows > Preferences, you will see a new option for Flex Formatter. There is a nice preview window that shows you what your code will look like based on your options. Now to use it, you can highlight the text that you want formatted and select the indent icon from the tool bar, or what I usually do is just click Shift+Ctrl+F to format the whole file.
Flex Formatter also has a nice feature where you can import/export your setting from/to other developers on your team.
Be careful though when formatting XML (and I am not sure I am supposed to use it to format XML), because with my settings, it formatted

 
myValue

to

 

    myValue

And it did that by adding a bunch of spaces, which caused an error. Had to go and modify some options to stop it from doing that.
All in all pretty nice tool, recommended.

My CFObjective 09 presentations

Thank you for all who attended my talks. Attached are my 2 presentations: Air Desktop capabilities and Setting Up Robust Communication Between Flex and ColdFusion.

Syndicate content