Here is how to do it.
1: <head runat="server">
2: <asp:PlaceHolder runat="server">
3: <%= @"<link rel='stylesheet' type='text/css' href='/css/main.css?v=" + Web.Configuration.JS_VERSION + "' />" %>
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.
Good Coders Code, Great Coders Reuse
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.
This quote hit home for me. Just thought I would repost it.
I used to be the one who would ask, "where is everyone we're a startup and it's only 7:30pm?" I used to freak out if I saw a line of code that was stupidly duplicated or just plain wrong.
It's been 3 startups, and 2 kids later that I realize just how wrong I was... so far no great success - but moderate success, many lessons learned and certainly people i've pushed away for truly silly reasons like perceived hours spent behind the desk or strange lines of code written... reality is I now spend fewer hours behind the desk although admittedly probably still far too many to be sane... and definitely used to (and still do) write crazy lines of code... I think it's a matter of perspective, age, prospects and who knows probably other factors that'll influence our feelings about how many hours we need to put in... after all, is it one critical bug fixed or 100s of lines of new code written which matters more - is a mater of perspective, that one bug fixed could make the difference between winning the big client or losing'em... I think "hours spent behind the desk" is a silly measure of ones productivity... a well rested mind after all makes far better decisions - that's not to say we should be lazy, but that we need balance - plain and simple.
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.
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.
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
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.
When people you disagree with speak, listen to their ideas and try to ignore their words.