What Gives? Microsofts Code Generation Tool

Interview Questions

16. April 2013 12:35 by Scott in   //  Tags:   //   Comments (0)

I am starting to go on Interviews.  I was asked some questions I needed a mental refresher on.  I guess I don’t use these on a day to day basis with my current company, so I fell out of habit with them.  I also think that since I didn’t receive any formal training in CS, I don’t know much for keywords which could also be the problem.  I understand the concepts, just not the actual verbs for each concept.

1. What is a primitive data type?

Char, Int, Floating Points, boolean and pointers would all be considered primitive data types.

2. Whats relationship between objects and classes?

Objects are the actual instance of each class.  Objects can be created and destroyed, objects are living.

3. Whats an Interface?

A template of a class that needs to be implemented or inherited from, but without doing any work.

4. Whats an Abstract Class?

Same as an interface, but this class can do work within its methods.

5. Whats a static variable?

A variable that lives within the class, but it’s the same for every object of that class.  So if it changes for one object, it will change for every object.

6. Whats a Race condition?

Where an output of “mostly” multi threaded programming is dependent upon the timing of the uncontrolled events.

7. What is a deadlock?

Where two competing actions are waiting for the other to finish.

Quote of the Day

28. December 2012 17:12 by Scott in Quote  //  Tags:   //   Comments (0)

Good Coders Code, Great Coders Reuse

Give It To the Lazy Person

9. May 2012 20:04 by Scott in   //  Tags:   //   Comments (0)

If you have a difficult task to do, give it to a lazy man, he will find an easier way to do it.

 

A toothpaste factory had a problem: they sometimes shipped empty boxes, without the tube inside. This was due to the way the production line was set up, and people with experience in designing production lines will tell you how difficult it is to have everything happen with timings so precise that every single unit coming out of it is perfect 100% of the time. Small variations in the environment (which can’t be controlled in a cost-effective fashion) mean you must have quality assurance checks smartly distributed across the line so that customers all the way down the supermarket don’t get pissed off and buy someone else’s product instead.

Understanding how important that was, the CEO of the toothpaste factory got the top people in the company together and they decided to start a new project, in which they would hire an external engineering company to solve their empty boxes problem, as their engineering department was already too stretched to take on any extra effort. The project followed the usual process: budget and project sponsor allocated, RFP, third-parties selected, and six months (and $8 million) later they had a fantastic solution — on time, on budget, high quality and everyone in the project had a great time. They solved the problem by using some high-tech precision scales that would sound a bell and flash lights whenever a toothpaste box weighing less than it should. The line would stop, and someone had to walk over and yank the defective box out of it, pressing another button when done.

A while later, the CEO decides to have a look at the ROI of the project: amazing results! No empty boxes ever shipped out of the factory after the scales were put in place. Very few customer complaints, and they were gaining market share. “That’s some money well spent!” – he says, before looking closely at the other statistics in the report.

It turns out, the number of defects picked up by the scales was 0 after three weeks of production use. It should’ve been picking up at least a dozen a day, so maybe there was something wrong with the report. He filed a bug against it, and after some investigation, the engineers come back saying the report was actually correct. The scales really weren'’t picking up any defects, because all boxes that got to that point in the conveyor belt were good.

Puzzled, the CEO travels down to the factory, and walks up to the part of the line where the precision scales were installed. A few feet before it, there was a $20 desk fan, blowing the empty boxes out of the belt and into a bin. “Oh, that — one of the guys put it there ’cause he was tired of walking over every time the bell rang”, says one of the workers.

Answers.OnStartUps.com – Your Doing It Wrong

30. March 2012 02:20 by Scott in Opinion, Rant  //  Tags:   //   Comments (0)

I am a firm advocate of the StackExchange network.  It does good work and it allows us all to take less time to do something it took a bit longer several years ago.  I have been following answers.startups.com for a while now and its one of my favorite StackExchange sites.  I love startups and I am also attempting one right now for my self.

The problem I have with this site though is not the answers it gives, but with the answers it doesn’t give.  I personally think the FAQ of the site needs to be updated and changed.  They are closing too many questions that have to do with startups in one way or another.

Lets take for example, this question on pricing for a startup.  Lets look at the FAQ to see where this falls under. The FAQ specifically states:

Topics include financing, hiring employees, renting an office, legal, marketing, sales, compensation plans, banking, payroll, benefits, and more. This is the place to come with specific questions or to seek specific advice from your peers.

The question here, is about pricing and sales of their particular startup.  How am I going to sell this product better than what I currently sell it at?  Yet, it was closed and proceeded to be voted on by three people who think they have read the FAQ thoroughly.

Lets take a look at another one.  This one asking for tips on marketing.  While a pretty general question, but if we look at the FAQ again.  It falls under marketing.  Again, it was closed by four people who think they have read the FAQ.  The problem here is they haven’t.  Things like marketing an application or startup is a pretty good question.  I would personally love to market my start up differently if I only knew how.

One more, just to prove a point.  This one asking what type of offer to provide new members of a company.  This has to do with hiring an employee, but they say it is too localized.  I ask them, when has a start up ever been started by just two people and adding the third on some time later?  Have you ever heard of a start up that doesn’t do that?  Definitely not me. (sarcastic) This person wanted to know if the offer they provided was sufficient enough.  I would look at this question if I brought in a third person for my startup.  I can then get a much better gauge at what to offer them.  Therefore, I have used this question to help answer my question of hiring someone else.  Not localized at all.

Now, lets look somewhere else.  Everyone knows about YCombinator.  At least everyone I talk to in the startup world.  One of my friends actually got accepted to this latest group and just had his demo day.  I personally asked him, what he thought the best part of YC was.  He said it was the people.  To know, he can post a question to any one of them about any part of his startup and get the advice needed.  It didn’t matter what topic the question was on, he would get some honest and good feedback and even some help if he needed it. Sadly, that's not relevant here at answers.onstartups.com, even though they clearly state “seek specific advice from our peers” in their FAQ.

On the front page it self, I count 5 closed questions alone.  That means, that this answer forum is throwing away 1/4th to 1/3rd of their user community.  What person wants to see this site for the very first time, asks a question and then gets told its not on topic.  I would be pushed away never to return.

I ask you answers.onstartups.com, what are you actually trying to accomplish?  Are you trying to accomplish me coming to your site, because I don’t know anyone else to ask, and ask a question that I can get real answers to?  Or are you trying to just have the business end of the startups answered? 

I personally don’t think this site has a specific goal in mind and needs to reign in their moderators.  They are pushing too many people away when they can’t even be that exclusive.  One day, this site could be the Forrst for startups, but not today.  Not while they have problems without specific goals in mind.

There is a problem with some of these Q&A sites. Its that there is no correct answer.  Its not a programming site, where I can show you solid logic to back up my claims.  Its advice.  Advice on what we have done and what worked and what didn’t.  I think that's the real problem with answers.onstartups.com.  It expects logic, and not actual advice to be the correct answer.

Obtaining Line Numbers When Viewing a StackTrace With ClickOnce Deployment

19. March 2012 16:49 by Scott in WPF  //  Tags:   //   Comments (0)

When publishing a WPF application.  I used the Click Once method as it seems to be the best and quickest way to auto update desktop applications.

Its like auto updating apps these days on phones and tablets, but this time its on a windows desktop.

So, I had implemented it and we have had users download our beta piece of software for it.  The first problem I saw when errors started arriving was the line numbers weren’t being taken.  So I knew it first, we weren’t publishing the .PDB files when we published via ClickOnce.

So we went searching and its sort of hidden away.  But Right click on the Project –> Properties –> Publish Tab –> Application Files Button then Click Show All Files.  You can then require that the PDBs get published with the app.  It will show line numbers now in Errors and it will be much easier to see problems.

Java JPA Just Sucks

6. March 2012 14:22 by Scott in Java, ESRI  //  Tags: ,   //   Comments (0)

Now hear me out, before you go commenting like crazy or I stir a hornets nest saying something bad about Java.

We have this project at work that has consumed a year and a half of development time.  Some developer in the very beginning decided to use Java JPA and Java webservices as the server side environment.  So we went with it.  After a while, we ran into Java JPA.  For those .Net folks out there, its Java’s attempt at LINQ or the Entity framework.  While its not bad, I seem to run across countless more problems with it than I ever would have with LINQ or Entity.

It generates tables poorly, it has problems with foreign keys and it doesn’t error out properly with good error codes or problems.  Overall, it is just a poor attempt.  Sort of reminds me when I started developing in highschool.  Tons of concepts, bad design and crappy documentation.

I attempted to convince my colleagues to move over to .Net before it was too late, but sadly they thought we were already too far in. 

If you would like some proof, well let me just show you.  I received this error just now.

JPA table “sequence” does not exist.

What sort of error is that?  Where does that come from and how would that even help me towards a solid solution?  So I google it and find one thing on stackoverflow.

Sadly, the link http://stackoverflow.com/questions/8761448/jpa-table-sequence-does-not-exist doesn’t help much either.

At least in .Net they will both tell you the problem and suggest a fix in the comments of the error.  Yes, thats right, they will suggest a fix.  You should all write your frameworks that way.  If you think an error is possible, help that poor coder along and give them solutions.  JPA reminds me a lot of ESRI code.

Thats my Rant.

[class E] uses a non-entity [class E] as target entity in the relationship attribute [field

6. March 2012 07:52 by Scott in Java  //  Tags: ,   //   Comments (0)

[class E] uses a non-entity [class E] as target entity in the relationship attribute [field

Busted in upon this error and didn’t find much for it online.

Its mainly caused because the Entity is not found in the persistance.xml document.  You have to make sure its added.

Quote of the Month

6. March 2012 07:13 by Scott in Quote  //  Tags:   //   Comments (0)

When people you disagree with speak, listen to their ideas and try to ignore their words.

Developer Income Report - February

1. March 2012 22:19 by Scott in Developer Income Report  //  Tags:   //   Comments (0)

The Intro:

This month, I made made more bug fixes on UtopiaPimp.  While the site is huge and collects a lot of data, the data is becoming much more manageable.   Other than that, I have been working hard on my new idea sort of discussed in the last paragraph from the last income report.  Its coming along nicely. The project it self will be ongoing for a while, but this part of it looks great and actually fully functional.  I probably will be able to finish it up for version 1.0 by the end of this coming month.

Show Me The Money:

This month was still great in advertising and actually still getting better.  To tell you the truth, this month was probably one of the best in the year.

  1. DemotivatedPosters.com - $5.35 – Ive never calculated the amount made per website so this is a small number to me.  I hope to make more over time.
  2. DrinkingFor.com - $0.94 – With only 1k people visiting the site, I guess its not bad to make a buck from it.
  3. UtopiaPimp.com - $82.54 – With over 1k clicks on these ads, I don’t know why im not making more money.  I should be making much more and must look into it.  Have my clicks are from a button ad just center perfectly right on the screen.  I wish Google Adsense had button ads, I think I would be making a lot more than I do at Project Wonderful.
  4. Project Wonderful - $88.84 – It was a large decrease from months before, and I definitely need to take a month and switch over to adsense and see what more I can make from there.
  5. AdSense - $129.00 – It was another jump up from months in the passed, but user stats are up on all the sites it is used on.
  6. MobFox - $13.00 – This is all thanks to my Roller Derby Penalty Timer.  Its well over 1,200 downloads now and thats all thanks to it being pushed little by little in the Roller Derby Community. 
  7. PostSecretCollection - $25.00 – Again surprised this month.  The numbers just keep going up for selling PostSecret post cards.  This site I made a while back allows people to print the postcards and have them mailed to them.  I sell each card for $1.97. I made the price as cheap as possible.  Paypal eats .40 cents and Postal Methods eats $1.46.  That leaves just .11 cents per postcard I can donate towards Suicide Prevention.
  8. UltimaHosts.net-$105.00 – With money made, comes expenditures.  Here is the hosting company one.  We sit on a 2 Core VM with 4 GBs of Ram.  Most times the ram is also inching in at 3.7GBs used.  So we need more Ram, but at this moment, all of my sites are running in good order.

Subtracting the costs to print, buy, mail, and host these projects, I made a profit of $150.29 this month!  While it doesn’t pay my rent, it does pay for an extra few days of day care for my little baby girl!

Whats Next?

I hope to fix just a few bugs that pop up with UtopiaPimp this month and maybe even get some time to update its User Interface.  This will most definitely make my users extremely happy along with allowing me to grow UtopiaPimp even more. Ive been using the same UI since the start of Pimp in 2002.  Its about time for an update.

How To Advance In Your Job – The Dirty List

22. February 2012 10:38 by Scott in Opinion, Work  //  Tags: ,   //   Comments (0)

Like all my other posts, I think short and to the point is the best way.  We are all busy people, so no need in going into a long drawn out post.

Ive talked to several managers, CEOs and big wigs at my company about the best way to advance in a job.  I decided to compile a list of the big hitters, the things that struck the most.  This list was confirmed by many other managers and executives at a few more companies, so I figured after much research and insight, I would share it here.

Here is the Dirty List on How To Advance In Your Job.

Technical Excellence – Know your job. What is required of you.  This is the only thing that takes time to figure out.  You need to know what they want of you and do it. Plain and simple, Find out what is required of you and then master it.

Deep Understanding of Customer Domain – You need to know your customer.  Know who your selling to, know who your making your product for and understand their needs and wants.  When you know this, you can easily make their lives better.  You can easily sell them more product.

Shown Leadership – You can be inspiring, motivating, consensus forming, challenging, a team builder,  an accepter of responsibility and you can meet commitments.  Thats how you show leadership.  Thats how you succeed as a leader.

Ability to Work in a Team – You see team success as the path to individual success.  You multiply your effectiveness through a team which you should fully understand.  This reminds me of the famous quote “Don’t ask what your country can do for you, ask what you can do for your country”  You are that team builder?  Do you see the success that can be achieved if we all work together?

Ability to Translate Tech Skills into Business Skills – Can you take what you learned as a technical person and translate those into business wins?  How to solve a problem is a tech skill, but can you move it into the business world?

Are You On The List? – No, not this list, but your managers list?  Are you the go to person?  Are you taking all the tasks that nobody wants?  Do you see these tasks through as well?  Can you handle doing a variety of things in order to earn your spot on the list your manager uses when picking someone for a new job.  You need to be the person your managers and your bosses go to, to get something big done.  You need to be on their list of people they trust will succeed at the job.

Something I always say when we need to complete something big, Lets Cowboy Up!  Lets get on that list.

Scott