Obama’s Website Reminds me of Couchbase’s and other Notes

by jmorris 15. December 2011 22:32

This is what inspires me to blog again after months of inactivity:

image image

Is it just me or don’t they, kind of look alike?

That observation aside, the Obama website is kind of creepy. It has an several forms for soliciting contact information from the sheeple:

http://my.barackobama.com/page/signup/who-would-you-bring

And this one which collects more data, allows you to make a donation and enter a Republican you knows contact info and they will send them a message:

“This holiday season, we're giving you a chance to have a little fun at the expense of a Republican in your life by letting them know they inspired you to make a donation to the Obama campaign.

Simply enter their name and email address below. Then, we'll send them a message letting them know they inspired you to donate. (Don't worry—we won't hold on to any of their information.)”

Immature and trite, if not weird action from the POTUS…meh politics.

Another interesting “feature” of the website is this splash page that comes up the first time you hit the site (try clearing cookies):

image

Note that it attempts to immediately get your email and zipcode? More point-of-contact and demographic information for the the big “B’s” big data machine. Notice how small the “continue to the website…” part is? It’s even in a muted color (in comparison to the “SHOP NOW” button).

Inspiration, wherever it may find me…

Tags:

rant

Twitter Fail

by jmorris 12. September 2011 05:50

image

I find it hard to believe that twitter is still experiencing problems of scale given it’s popularity and available resources. Mind boggling, really.

Tags:

rant

UH, OH!

by jmorris 30. August 2011 20:05

image

image 

image

Looks like the cloud evaporated…

Tags:

rant

What Am I Missing Here?

by jmorris 9. March 2011 07:16

So I am trying to purchase VS2010 for home use, side projects, etc…I google VS2010 price and click on the first “relevant” result: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/professional

And click the “BUY NOW” link which opens:

image

Great $549 for VS2010, way to expensive but within the budget. So click on the link to purchase and this is what I am presented:

image

$799.00? WTF? But wait, full version $549.00 (my only option, really). And what do I see in the cart?

image

Fantastic….

Tags:

rant

ActiveMQ: Topics vs. Queues

by jmorris 9. February 2011 13:47

The JMS specification defines two different ways of defining message destinations: Queues and Topics. Understanding the behavior of each is vital to implementing messaging within a system and fulfilling any expectations of message availability.

First a quick aside, the purpose of this post is mostly to keep myself from committing the mistakes I made today based upon invalid assumptions regarding the availability messages sent to a queue within an environment with multiple listeners. In a nutshell, I was writing a test to queue up a single message and I have a listener within the test receive the message.  For some reason the message was never being received…baffling given the simplicity of the test and the maturity of the code.

Here is the test (ignore that the test is not well written, I just want to quickly test that the code works while I am developing):

image

I edited this code a bit for simplicity, but in essence a message should be pumped to the console and displayed (real test validates that message was received after x seconds delay). The only problem was I that I was getting nada…note that I am not testing the queuing API itself, I am testing that the strategy will push a message onto the queue without throwing an exception. It’s basically a throwaway test to prove that it works as expected in an integrated environment.

The problem was that the message was never being received by the listener (QueueReceiver is the listener), however other similar tests that are messaging API specific were working as expected. Running through the usual checks turned up nothing. The code simple didn’t work…but only for this test! Swapping out for another queue worked perfectly :(

Fool me once, shame on you. Fool me twice…

So, what was causing the problem? Well it all became very clear once I went back and reflected on the basics of JMS messaging and the differences in how messages are delivered to queues and topics.

The JMS specification supports two models for sending messages: point-to-point for queues and publish and subscribe for topics. In a nutshell, only one consumer of a queue will receive a messaging regardless of the number of consumers; round-robin message dispersal. Whereas a topic broadcasts a copy of the message to every registered consumer.

It turns out out that I had a windows service running that was a consumer of the same queue and It was the first listener, so it always got the first message. The unit test never received a copy because only one message was sent and the consumer on the windows service always pulled it off. This was proved by simply calling publish twice:

image

This consumer (_receiver) got the second message, because the first one was consumed by the windows service and the next round-robin listener was this unit test. ARGGGHHHH, what a waste of time and brain power!

Lessons learnt:

  1. Don’t write unit tests with external dependencies and assume they will behave as expected
  2. Don’t use shared queues for testing
  3. Don’t forget the difference between queues and topics

References

Tags:

Apache.NMS, JMS | rant

.NET Framework 4 Client Profile: The Devil Itself!

by jmorris 7. January 2011 02:16

I am convinced that Microsoft’s decision to set the build profile of projects created with the Console Application template to “.NET 4 Client Profile” is a work of the devil itself! Why you might ask? Because it is set to this profile by default and because it will cause projects that should rightfully compile to fail, without an adequate explanation of why!

The reason this happens is because VS 2010 will allow you to reference projects and/or DLLs compiled under the “.NET 4 Framework” target, which may contain references to resources excluded by the “.NET 4 Client Profile” without complaining or warning the user. What a horrible, frustrating “feature”…

Here is a formal description from MSDN:

“The .NET Framework 4 Client Profile is a subset of the .NET Framework 4 that is optimized for client applications. It provides functionality for most client applications, including Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation (WCF), and ClickOnce features. This enables faster deployment and a smaller install package for applications that target the .NET Framework 4 Client Profile.”MSDN

Here is an example of a compile time error caused by this:

image 

The weird, confusing part is that while typing in the using statement for the namespace, intellisense will show you the namespaces and the object viewer will confirm that they exist. However, when you go to compile it will fail! Very frustrating!!!

This fix is very easy, simply right click on the project and select properties and then in the “Target Framework” dropdown, select “.NET 4 Framework” and your good to go. I am hoping that this will be fixed or changed in VS2010 SP1 that should be released soon.

Tags: , , , ,

rant | Visual Studio

Design Fail

by jmorris 28. October 2010 13:59

While I am not much of a front end developer or much less a designer,  the design elements of some sites are so poor, that even I shake my head in disbelief. While doing some research for a future post on refactoring and method groups, I came across this site: www.thedesignmethodgroup.com

image 

Note that the site is all flash and you navigate with that teeny, tiny little menu thing!  As you click the on the menu item squares the flash app moves another layer into focus which contains quotes from various famous people. The problem is, WTF does the company even do? It took me awhile navigating through this maze to find out they are a marketing company…apparently the focus on “creating customers”. Maybe the should focus on “communicating with customers” first.

BTW, here is the “Clients Page”:

image

Is it any wonder?

Tags: , ,

rant

ViewState Fail…

by jmorris 13. October 2010 01:30

image

I _really_ despise ViewState…from the page bloat to the innocuous ViewStateException errors that litter my logs: “The state information is invalid for this page and might be corrupted”. For the little bit of good it does persisting state between postbacks, it causes huge amounts of grief…I guarantee I have spent more time circumventing it’s grasp than embracing it’s utility.

Tags: , ,

rant

The Differences between the Average PHP and ASP.NET Developer

by jmorris 6. October 2010 00:47

I have been interviewing for a number of different positions in the company I work for and have begin to notice a number of core differences between “average” PHP and ASP.NET developers.

The positions in most cases are similar: front end web developer. In a nutshell, the following are some of my “hasty generalizations” from interviewing multiple developers from both camps.

PHP Developers

  • PHP developers in general are far better at traditional web developer skills such as CSS, XHTML, JQuery/JavaScript…in general making things look really nice, maintaining Web standards compliance and resolving cross browser issues.
  • PHP developers tend to understand the basics of SEO (importance of URL structure, clean XHTML, importance of H1, H2…, meta description and keywords, etc).
  • PHP developers understand how the Web in general works, they know what REST means and they know why REST is used.
  • PHP developers aren’t too interested software patterns, architecture or software engineering in general…any good means to an end is justification enough.
  • When you ask them about AJAX they say things like “JSON”, “DOM”, “$.ajax()”, and “XHR”
  • Can hand code HTML
  • Will tolerate embedded SQL in their pages
  • Don’t unit test

ASP.NET Developers

  • ASP.NET developers say that the know CSS, but they usually really don’t. The better one’s know that tables are evil and should be avoided at all costs, however some do not. Basically, CSS and HTML are the domain of the Web designer.
  • ASP.NET Developers tend to not understand the basics of SEO; most ASP.NET developers work on intranet style projects or Web applications, not Web sites so they lack this important skill set.
  • ASP.NET developers think that REST is a “buzzword” and therefore must gone on the resume, but they really don’t understand what it means: “Well, I don’t really know the theory, but I know how to Google really well!”.
  • ASP.NET developers tend to know the basics of Agile processes (but often confuse it with any ad-hoc development) and software engineering in general. They tend to have a superficial understanding of patterns, but aren’t hell bent on the practice.
  • When you ask them about AJAX they say “AJAX Toolkit” and “Update Panel”
  • Think that an HTML is the result of dragging something from your toolbox of their IDE.
  • Know Linq2Sql and have heard of the Entity Framework and NHibernate. In general understand the importance of layering applications.
  • Don’t unit test….it takes too much time and is too hard, but they “have read about it” and agree it would be a good thing given they had the time.

Note that this does not apply to all developers; there are definitely some diamonds in the rough, but those are the exception. Also, note that if you are reading this you are probably the exception in that most developers do not read blogs; they reach into their bag of Google for answers and then find the search result that allows them to copy and paste the solution.

Tags: , ,

rant

Two Questions that Most ASP.NET Developers Cannot Answer

by jmorris 10. September 2010 22:44

After interviewing approximently 30 applicant's for mid-level to senior level ASP.NET positions, nearly all cannot answer the following two questions:

  1. Describe the following access modifiers:
    1. private
    2. protected
    3. internal
    4. public
  2. What is the difference between an ASP.NET Literal control and a Label control

If they answer one of the two questions above, we bring them in for a more in-depth test and then subsequent interviews if they get a passsing score on the test. The first question is among the most basic of questions you can ask someone regarding the language we use, C#. The other is a simple question regarding the output of two ASP.NET WebForms controls...note that the average applicant has multiple years experiance (per their resume) on the WebForms platform. Also, before you say "why aren't you using MVC?", that statement is irrelevent to the questions.

Would you believe 1 in 10 developers (that I interviewed) cannot answer both questions? Sad, really...

Tags:

rant

Who Am I?

My name is Jeff Morris a software engineer/developer in Southern California, USA. My platform du jour is dotnet, but I dabble on the darkside occasionally.

Tag cloud

Page List