答:
Short answer: In an extranet or internet site, it makes sense not to show the stacktrace. In an intranet the benefits of showing the stacktrace surpass those of hiding it.

Long answer:

The same happened to me at work. I used to think that if an app fails, it should fail noisily.

But then they explained to me that a potencial hacker could infere a lot of things from a stacktrace.

I think there is no need for proof. Is evident that the more a hacker knows about your platform the better for him and that the less a hacker knows about your platform the better for you.

Also companies are not eager to disclose how a hacker broke into their systems.

On the other hand, it's an intranet, and I think that the advantages of knowing inmediatly what went wrong whitout having to search a log file is of great advantage and security risks of showing a stacktrace inside the boundaries of your company is not as high as they are saying.


问:
Why is Java the lingua franca at so many institutions?
EDIT: This question at first seems to be bashing Java, and I guess at this point it is a bit. However, the bigger point I am trying to make is why any one single language is chosen as the one end all be all solution to all problems. Java happens to be the one that's used so that's the one I had to beat on here, but I'm not intentionality ripping Java a new one :)

I don't like Java in most academic settings. I'm not saying the language itself is bad -- it has several extremely desirable aspects, most importantly the ability to run without recompilation on most any platform. Nothing wrong with using the language for Your Next App ^TM. (Not something I would personally do, but that's more because I have less experience with it, rather than it's design being poor)

I think it is a waste that high level CS courses are taught using Java as a language. Too many of my co-students cannot program worth a damn, because they don't know how to work in a non-garbage-collected world. They don't fundamentally understand the machines they are programming for. When someone can work outside of a garbage collected world, they can work inside of one, but not vice versa. GC is a tool, not a crutch. But the way it is used to teach computer science students is a as a crutch.

Computer science should not teach an entire suite of courses tailored to a single language. Students leave with the idea that all good design is idiomatic Java design, and that Object Oriented Design is the ONE TRUE WAY THAT IS THE ONLY WAY THINGS CAN BE DONE. Other languages, at least one of them not being a garbage collected language, should be used in teaching, in order to give the graduate a better understanding of the machines.

It is an embarrassment that somebody with a PHD in CS from a respected institution cannot program their way out of a paper bag.

What's worse, is that when I talk to those CS professors who actually do understand how things operate, they share feelings like this, that we're doing a disservice to our students by doing everything in Java. (Note that the above would be the same if I replaced it with any other language, generally using a single language is the problem, not Java itself)

In total, I feel I can no longer respect any kind of degree at all -- when I can't see those around me able to program their way out of fizzbuzz problems.

Why/how did it get to be this way?

答:
Laziness and profit motive. Java gets most people 80% of the way, with 20% of the effort. However, this often produces "monkey see monkey do" voodoo coders who don't have deep understanding of what is happening, and are unable to dig deeper than high-level tools.

Teaching C/C++ properly is difficult. Even when done well, quite a few won't fully understand low-level concepts like pointers (there are studies on this). Moreover, it does not seem immediately relevant in the job market.

ContentLicense: CC BY-SA 3.0

ContentLicense: CC BY-SA 2.5


问:
Can my company give IP rights away for an application I wrote off hours to another startup?
I am an intern for a health company (unpaid), let's call it Company A and I noticed that they are using a lot of paper form for things that can be done on the computer. Excel files for things that shouldn't be in Excel. So I wanted to improve on my programming and figured that it was the best opportunity to do.

I developed a couple of apps for their use. All these applications were outside company time. One application I did and they love and one of the director has a brother who has a health start up company. He wants me to give over my source code so his brother's company can further develop it and maybe sell it (I am out of the equation).

I have no intention of handing over my code as I put a lot of time outside doing it but I also don't want to burn bridges with anyone in the company. I can't go to the director and tell him "I don't think so".

I am fine with demoing to the brother how it works but the line is giving up my code. If they want to build something like it then they can go right ahead I have no problem with it.

What is the correct way of approaching this and do they have the right to do this to me?

Edit: there is no contract I never signed anything

答:
This depends on the contract you signed.

Just because you did it "on your own time" does not mean it is yours to keep. This is 100% a contract issue.

You have to be careful when you say "on your own time." What do you think that means? If a pro basketball player decided to play for two teams, do you think thats ok? He obviously has down time to do what he wants. So should he be able to do that?

You also have to be careful about getting sued now by the company. They could say you used some of their Intellectual Property to produce an application you had no right to, especially if you decide to sell this or give it away to another company later.

That being said, were you hired as a Intern programmer to the Health Insurance Company? If you were hired as a programmer I am going to say you are most likely obligated to give them the source code.

I have seen plenty of contracts that say everything an employee creates , no matter what it is, is owned by the company. I imagine Apple and Microsoft most likely have these clauses. Chalk this up to lessons learned.

Look at it from their perspective. How did you write the application? On your own computer you brought to work or one of theirs? On their network? Did you test against their data and their forms?

This isn't a matter of ethics, it is a matter of legality.

If you signed a contract that makes all your works theirs, and the Director has the power to make decisions about their companies works, he can do what he wants.


问:
Http handler for classic ASP application for introducing a layer between client and server
I've a huge classic ASP application where in thousands of users manage their company/business data. Currently this is not multi-user so that application users can create users and authorize them to access certain areas in the system.

I'm thinking of writing a handler which will act as middle man between client and server and go through every request and find out who the user is and whether he is authorized to access the data he is trying to.

For the moment ignore about the part how I'm going to check the authorization and all that stuff. Just want to know whether I can implement a ASP.net handler and use it as middle man for the requests coming for a asp website? I just want to read the url and see what is the page user is trying to access and what are the parameters he is passing in the url the posted data. Is this possible? I read that Asp.net handler cannot be used with asp website and I need to use isapi filter or extensions for that and that can be developed only c/c++.

Can anybody through some light on this and guide me whether I'm in the right direction or not?

答:
A .Net handler can't be used with ASP because IIS can only hand the request off to one handler for each request. ASP and .Net have distinct handlers.

If you wanted to write a .Net HTTPModule to act as a Man in the Middle, the handler for the request would need to be .Net.

I've not tried it, but I reckon if you then wrote a .Net HTTPHandler to service the ASP page (which basically just runs the ASP as a VBScript), you'd have complications with the Request and Response objects. Probably more effort than its worth even trying.

An ISAPI Filter would be the most straight-forward way to go but may not be practical if you don't have the C++ experience. But what you're doing doesn't sound like particularly new ground and there may be an existing implementation you can use.


答:
I am not a lawyer.  The following is friendly (bad) advice, not legal advice.

Do I understand correctly that you interned at company A, and one fellow's brother works at company B and company B wants your code for free?  Ha!

You need to determine who owns the code.  What sort of agreement did you sign when you agreed to intern with Company A?  Many "non-disclosure" agreements have a clause that gives all your work to the company, whether done on your own time, or work related, or not.  Sadly, this is very standard these days.  In some states (Delaware, I think), this clause is not legal, so state law may come into effect as well.

Another variable is any sort of non-compete agreement that either you, or the guy with the brother may have signed.  Giving or selling a useful tool to another company could be competition, or moonlighting, and probably needs to be cleared with Company A's ethics office - either by you, or preferably by the A-employee with the brother in Company B.  He is probably violating ethics.  You don't have to throw him to the wolves, but you might want to ask him about the ethics of what he is proposing.  That alone may take some of the wind out of his brother's sails.

If Company A owns the code OR has a legal agreement preventing you from working with Company B, then your only bargaining power is to disclose fully to Company A and ask Company A (nicely) to let you license the code in order to keep you happy, but you may have to promise to work for Company A in return.

You might need an intellectual property lawyer to sort this out, and they are not cheap.  Coming to some sort of written agreement with Company A (fully disclosing what you are doing) before doing anything with Company B is probably the only safe way to proceed.

Remember, you are more valuable than your code.  Better to get out of a potential mess than to spend the next 10 years in and out of court, or jail.  You'll probably write it better the second time anyway, and hopefully some company will pay you for the time it takes you to do it.

Good luck.

Title: Can my company give IP rights away for an application I wrote off hours to another startup?

Body:
I am an intern for a health company (unpaid), let's call it Company A and I noticed that they are using a lot of paper form for things that can be done on the computer. Excel files for things that shouldn't be in Excel. So I wanted to improve on my programming and figured that it was the best opportunity to do.

I developed a couple of apps for their use. All these applications were outside company time. One application I did and they love and one of the director has a brother who has a health start up company. He wants me to give over my source code so his brother's company can further develop it and maybe sell it (I am out of the equation).

I have no intention of handing over my code as I put a lot of time outside doing it but I also don't want to burn bridges with anyone in the company. I can't go to the director and tell him "I don't think so".

I am fine with demoing to the brother how it works but the line is giving up my code. If they want to build something like it then they can go right ahead I have no problem with it.

What is the correct way of approaching this and do they have the right to do this to me?

Edit: there is no contract I never signed anything


问:
Is the 'C' in MVC really necessary?
I understand the role of the model and view in the Model-View-Controller pattern, but I have a hard time understanding why a controller is necessary.

Let's assume we're creating a chess program using an MVC approach; the game state should be the model, and the GUI should be the view. What exactly is the controller in this case?

Is it just a separate class that has all the functions that will be called when you, say, click on a tile? Why not just perform all the logic on the model in the view itself?

答:
I understand the role of the model and view in the Model-View-Controller pattern, but I have a hard time understanding why a controller is necessary.

Are you sure about that?(At least as originally described)  The point of the model is to be the domain model.  The view is supposed to display the domain model to the user.  The controller is supposed to map low level input to high level model speak.  As far as I can tell the reasoning is something along the lines of: A) a high level use of the SRP. B) The model was considered the important part of the app so keep the unimportant and faster changing stuff out of it.  C) easily testable (and script-able) business logic.

Just think if you want to make your Chess program useable by the blind, swap out the view for a audible version, and a controller that works with the keyboard.  Say you want to add games by mail, add a controller that accepts text.  Net version of the game? A controller that accepts commands from a socket would do the job.  Add a nice 3d render to it, a cool new view.  Zero model changes necessary Chess is still chess.

If you mix input in with model representation then you lose that ability.  Suddenly Chess isn't Chess, it is  Chess with a mouse which is different from Chess with a keyboard or network connection.

Title: Is the 'C' in MVC really necessary?


答:
IANAL.  Contract does matter here.  That's all I can say on that and I won't repeat the advice everyone else has given.  The company may already own it and you have no say in the matter.  Even a lawyer would tell you to hire a lawyer if you decide to simply say "No".  So if that's your choice, hire a lawyer.

I read and re-read this question until I figured out why you care about Burning Bridges.  I'm guessing that your real concern is that, as an intern, you're not looking for a million dollars.  Heck, you don't specify that you're a software development intern, which may mean that you didn't go into this intending to be a programmer. I think what you're really looking for is the company to show respect for your work. You may have even surprised yourself with how well this project turned out and maybe you want to move into a new career path as a software developer.  This is something to be proud of.  This project is a big deal, don't clutter this with needless crap by taking one thing your boss said and blowing it out of proportion.

The Boss Perspective

First and foremost, remember that your boss is human.  He makes mistakes just like everyone else.  Second, you also need to consider that your boss may not know anything about software.  You showed him something cool, which he is thinking "Cool, my brother knows software; he could do something with this."  He doesn't know it took you a lot of time.  It's likely he might not even know that you're still an unpaid intern.

How To Think About It

First, I'm going to tell you that you can win this.  Even if this company has you under the nastiest contract known to man, in the most anti-employee market on earth, and you have an  extremely mean boss, this is still a winnable situation.  You could quite easily get them to understand your worth here.

The question is, how do you want them to demonstrate that they care about your work?  Do you really want to get paid for this project?  Based on the fact that you are willing to demo the software, I'm guessing you don't much care about the payment part, but more the fact that you worked really hard and want to be acknowledged for it.  If you'd like a permanent position at the company in exchange, then make that evident.  If you think you'd like to move into software development, maybe you could ask about being moved into the brother's company in a real, paying position.

The bottom line is, before you can approach your boss about getting what you want, you have to truly decide what you want.

How To Approach The Boss

First thing's first, don't try to catch the boss while he's walking between meetings.  Set up an appointment.  You may only need five minutes, but five minutes is a lot of time when you're running a company.  Talk to him and ask about times that work for him and put the appointment on his calendar if you can.

With the appointment set up, you need to go in prepared.  Have an outline of the points you want to make on a piece of paper with you so you don't get nervous and forget everything.  Remember that more people list Public Speaking as their number one fear than Death.  You will forget stuff, so write it down.  Going in prepared also looks good to the boss.  It shows him you're not trying to waste his time.  Even the most anal of bosses relaxes a bit when he sees you've prepared what you're going to say.

What To Say

Nothing is more valuable to a manager than numbers.  If you grab a BLS statistic or two, you're more likely to get his attention.  If you can, calculate the potential value to his company in real dollar amounts and put it in front of him.  Show him that you're worth something in terms of time, sales, or if you can, flat dollar amounts.

Use of buzzwords only helps if your boss is into that sort of thing.  It's important that you stay on point.  Your boss doesn't care about how you wrote that program.  He wouldn't understand it if you explained it.  He just wants to hear about why you think it's worth something to him.

Don't get personal.  Like I said, the boss isn't going to speak your language.  Don't spend time explaining some really challenging bug you overcame when writing the program.  It's a black box to him.  As far as he's concerned it cost you nothing to write it.  Instead, throw numbers at him as to cost to you, in terms of time and money.

Look at the things he's said in the past and try to associate it with the work you've done.  If you've worked with the boss before, this can be easy. Associate the work you've done with specific complaints he's made in the past.  Demonstrate how you're fixing problems he's encountered and why you're worth it.

It Can Be Done

I can tell you in all honesty this is doable.  I've sold these sorts of ideas in the past.  It's just a matter of doing it right.  Think about the things he's thinking about and speak his language and you truly can get what you want out of this.


问:
Why aren't more desktop apps written with Qt?
As far as I know and have understood in my experience with Qt, it's a very good and easy to learn library. It has a very well designed API and is cross-platform, and these are just two of the many features that make it attractive. I'm interested to know why more programmers don't use Qt. Is there a deficiency which speaks against it? Which feature makes other libraries better than Qt? Is the issue related to licensing?</p>

答:
One reason to not use Qt is that if you only write for one architecture, such as Windows, you may want to use C#/.NET (or Cocoa on Mac) because they will invariably be able to take advantage of the latest bells-and-whistles of the OS.

If you are writing cross-platform apps, then you may already be heavily vested in another technology such as Java (i.e. you work in a "Java Shop"). Your choice of technology might be dictated by the ecosystem in which you are developing, such as language-specific APIs. In these sorts of cases, minimizing the number of technologies may be beneficial.

A third reason that I can think of is that Qt is based around C++, and C++ is a comparatively difficult/dangerous language to program in. I think it is a language for professionals. If you need to have top performance and are capable of being meticulous, then C++ is probably still the best game in town.  Actually, Qt ameliorates a lot of the memory management problems if you set things up to fall out of scope. Also, Qt itself does a good job insulating the user from a lot of the nasty C++ issues. Every language and framework has its pros and cons.  It is a very, very complicated issue that usually can be summarized by the addage often seen in diners: Speed, Quality, and Price (but you can only pick two).

Although the rules say I should keep focused on answering the question, I do want to rebut some of the issues raised by Billy ONeal, who I think does a good job summarizing the commonly cited reasons to not use Qt:

Qt is indeed a C++ library/framework/header files.  It is augmented by a macro processor (moc) which enables signals and slots, among many other things.  It transforms additional macro commands (such as Q_OBJECT) so that classes have introspection and all sorts of other goodies that you might think of as adding Objective-C functionality to C++. If you know enough about C++ to be offended by this lack of purity, i.e. you are a pro, then 1) don't use Q_OBJECT and its ilk or 2) be grateful that it does this, and program around the very limited corner cases where this causes a problem. For folks who say "Use Boost for signals and slots!" then I would retort that you are exchanging one "problem" for another. Boost is huge, and it has its own commonly-cited issues such as poor documentation, horrendous API, and cross-platform horrors (think old compilers like gcc 3.3 and big iron compilers like AIX).

For editor support, this also follows from 1, I somewhat agree. Actually, Qt Creator is IMHO the best graphical C++ editor, period, even if you don't use the Qt stuff.  Many professional programmers use emacs and vim. Also, I think Eclipse handles the additional syntax.  Thus, no problems with the Qt macros (Q_OBJECT) or signals/slots additions. You will probably not find these macros in Visual Studio, because (I concede) they are additions to C++. But by and large, C#/.NET folks aren't going to be using Qt anyway, due to the fact that they have a lot of the functionality covered with their own proprietary techniques.

As to the size of the Qt source, so long as it compiles overnight, who cares?  I compiled Qt 4 on my dual core Macbook in "less than overnight."  I certainly hope this is not what is driving your decision to use or not use a particular technology. If this is truly a problem, then you can download the precompiled SDKs for Mac, Linux, and Windows from the Qt website.

Licensing is available in three choices:  1) Proprietary license in case you wish to modify Qt ITSELF and not share, or hide the fact that one is using Qt and not willing to give attribution (could be very important for branding and image!) 2) GPL and 3) LGPL. Yes, there are issues with static linking (rolling all of Qt into the binary) -- but I think that's more because one can't peek inside and notice that you are using Qt (attribution!).  I tried to buy a proprietary license from Digia, and they told me "for what you are doing, you really don't need it."  Wow.  From a business who is in the business of selling licenses.

The size of the binary/bundle is because you have to distribute the Qt stuff to folks who don't have it: Windows already has? the Visual Studio stuff or you have to install the run-time. Mac already comes with the enormous Cocoa, and can be dynamically linked.  Though I don't do a lot of distribution, I have never found much issue with distributing the ~50 megabyte static file (which I can make even smaller with some of the binary stripper/compression utilities like UPX).  I just don't care enough to do this, but if bandwidth were ever an issue, I would add a UPX step to my build script.

What defines "Native Look and Feel?"  I think "most" would agree that Mac comes closest to unified look and feel. But here I sit, looking at Safari, iTunes, Aperture, Final Cut Pro, Pages, etc. and they look nothing alike despite the fact that they are made by the OS vendor. I think the "feel" aspect is more relevant: widget styling, responsiveness, etc.  If you care about responsiveness, then here is a good reason to use C++ rather than Java, or some other highly dynamic language. (Objective C also rocks, but I'm trying to dispel myths about Qt)

In summary, it's a complicated issue. But I would like to point out that I think there are less reasons to "not use Qt" as one might think based on myths and decade-out-of-date information.


问:
Differences between imperative-language and functional-language debuggers
Up to now I have always worked with imperative languages like Pascal, C, C++, Java in a production environment, so I have experience with debuggers for these languages (Turbo Pascal, Turbo C, GDB / DDD, Visual Studio, Eclipse).

A debugger for an imperative language normally allows to

Set break points on statements, and execute the program until the next break point is encountered.

Execute the program one statement at a time, with the option of entering a function / method call or skipping over to the following statement.

When program execution is paused, one can examine the current state of the program, i.e.:

Inspect the contents of the stack to see the current nesting of function calls.

Inspect local variables, actual function parameters, global variables, and so on.

Since I have never worked with a functional programming language in a production environment, I was trying to figure out how a debugger for such a language would look like. For example:

How does the debugger walk through the program if there are no statements like in an imperative language? Where does one set break points?

In a language with lazy evaluation like Haskell, the sequence of function calls can be different from that of an eager language: will this make a big difference when trying to understand the call stack?

What about variables? Since there is no state, I imagine that a debugger will only show the variable bindings for the current scope (?), i.e. there will be no local or global variables changing value as I step through the program.

Summarizing, are there any general, common features of functional-language debuggers that clearly distinguish them from imperative-language debuggers?

答:
How does the debugger walk through the program if there are no statements like in an imperative language? Where does one set break points?

Most functional languages still have statements; they work as usual. Otherwise, it's generally on entrance to a function call or occasionally on a sub-expression.

In a language with lazy evaluation like Haskell, the sequence of function calls can be different from that of an eager language: will this make a big difference when trying to understand the call stack?

I've not done a lot, but from what I've seen it doesn't make a big difference in practice. Even in the worst case, it behaves similarly to concurrent imperative programs where the call stack itself is largely useless in determining the source of the bug.

What about variables? Since there is no state, I imagine that a debugger will only show the variable bindings for the current scope (?), i.e. there will be no local or global variables changing value as I step through the program.

Again, most functional languages have at least some state. The bigger impact is more along the lines of evaluating a lazy construct causing your program to be weird. This though isn't much different from lazy constructs in imperative languages like Python generators or C# enumerables.

In the end, there's not a whole lot of difference in my experience.


问:
Term for 24-bits
Is there a term for a 24-bit (3-byte) integer?

I know uncommon bit counts (such as a "nibble" or "nybble" for 4 bits) have names, and having 24-bits in both video and audio technology, for instance, is very common.

答:
I've seen tribyte used in various places for this.

On further exploration I see it is in fact used quite a lot particularly for the audio/video contexts that were mentioned.

Title: Term for 24-bits


问:
Is defining a variable to name a method argument a good practice?
For the sake of readability I often find myself defining temporary variables while calling functions, such as the following code

```<code>var preventUndo = true;
doSomething(preventUndo);
</code>```

The shorter version of this to this would be,

```<code>doSomething(true);
</code>```

But when I come back to the code I often wonder what true refers to. Is there a convention for this kind of conundrum?

答:
```<code>int preventUndo = true;
doSomething(preventUndo);
</code>```

A good compiler for low lavel languages such as C++ will optimize machine code of above 2 line as below:

```<code>doSomething(true);
</code>```

so it doesn't matter in performance but will increase readability.

Also it is helpful to use a variable in case it's will become variable later and may accept other values as well.

Body:
int preventUndo = true;
doSomething(preventUndo);

A good compiler for low lavel languages such as C++ will optimize machine code of above 2 line as below:

doSomething(true);

so it doesn't matter in performance but will increase readability.

Also it is helpful to use a variable in case it's will become variable later and may accept other values as well.


问:
Is using ELSE bad programming?
I've often come across bugs that have been caused by using the ELSE construct.  A prime example is something along the lines of:

```<code>If (passwordCheck() == false){
    displayMessage();
}else{
    letThemIn();
}
</code>```

To me this screams security problem.  I know that passwordCheck is likely to be a boolean, but I wouldn't place my applications security on it. What would happen if its a string, int etc?

I usually try to avoid using ELSE, and instead opt for two completely separate IF statements to test for what I expect.  Anything else then either gets ignored OR is specifically handled.

Surely this is a better way to prevent bugs / security issues entering your app.

How do you guys do it?

答:
I would argue that using branching logic of any kind should be avoided in as much as possible.  While nothing is wrong with ELSE or IF, there are lots of ways to write code to minimize the need to use any branching logic.  I'm not saying branching logic can be totally eliminated--it will be needed in some places--but it is possible to refactor code to eliminate a good chunk of it.  In most cases this will improve the intelligibility and accuracy of your code.

As one example, ternary operators are also usually good candidates:

```<code>If VIP Then
  Discount = .25
Else
  Discount = 0
End If
Total = (1 - Discount) * Total
</code>```

Using a ternary approach:

```<code>Discount = VIP ? .25 : 0
Total = (1 - Discount) * Total
</code>```

Ternary operators shift the branching to the right in a good way.

Title: Is using ELSE bad programming?

Body:
I would argue that using branching logic of any kind should be avoided in as much as possible.  While nothing is wrong with ELSE or IF, there are lots of ways to write code to minimize the need to use any branching logic.  I'm not saying branching logic can be totally eliminated--it will be needed in some places--but it is possible to refactor code to eliminate a good chunk of it.  In most cases this will improve the intelligibility and accuracy of your code.

As one example, ternary operators are also usually good candidates:

If VIP Then
  Discount = .25
Else
  Discount = 0
End If
Total = (1 - Discount) * Total

Using a ternary approach:

Discount = VIP ? .25 : 0
Total = (1 - Discount) * Total

Ternary operators shift the branching to the right in a good way.


问:
B.A Computer Science Vs B.S Inf Tech?
Would a recruiter prefer a B.A in Comp Science from a more prestigious university or a B.S in Inf Tech from just an average university? Would it matter for someone already established in the field with plenty of experience?

The only difference in the B.A and B.S is essentially the mathematics.  The B.S is geared for those going on to master's programs, although one isn't excluded from going on to a masters program with a BA, many do require more mathematics.

Just for those curious, the information tech degree is typically geared more to real-world problems then the computer science and the quality of it will vary widely. Some inf tech programs are as in-depth as an ABET C.S degree, the information tech from Drexel looks extremely strong. The Management Information Systems is generally provided via the business school and is more of a traditional business degree.

I'm not sure really how well versed the recruiters/g.p are in the actual differences in all of these programs. Some non ABET BS Comp Science may only require 1 or 2 Calculus versus the ABET certified programs.

答:
Here is my take as a non-professional programmer as I wonder how it would apply in this situation. I've had this question asked to me hundreds of times for my current career. FullDisclosure: I'm a full-time firefighter for a large metropolitan fire department. Skip to the bottom for the bottom line. :)

As you may or may not know, competition to get hired as a FF is super fierce. My testing location was the main convention center of our city and we had three days of testing with over 4000 applicants. A cutoff score determines that approx. 1000 people are subject to a formal interview. If you make it through that, you have a physical ability test where approx. 400 ppl are run through a testing course. Then you have the final interview where 150 - 300 ppl are formally interviewed a second time. After that you are either selected or not for another 6 to 10 months of Fire Academy training.

As you can imagine, this is a very stressful situation if you really want the job. Most advice to ppl that want to be a FF, is you need to "go above and beyond" to prove you want to be there. You must also speak to these things during the interview without sounding like a butthead. I hesitate to use the word passionate, but you need to do way more than the other person interviewing if you really want the job. Your attitude and ability to be a team player is judged from this. I.e. Volunteer, take a bunch of fire service related courses, better your community without prompting, etc.

I wonder if this is the same with interviewing for a programming job. Lets assume we all have the same basic skills and/or experience. In order to make yourself stand out do you need to go above and beyond? I.e. Volunteer to teach kids how to program. Be a member of this or that club/association and participate/Volunteer at said events. Take up a few languages and have a few pet projects for the interviewer to look at. Network like crazy and engage the community you want to be part of?

To me its always been pretty simple; Don't worry about stuff you can't control. For items you can control do everything in your power to better those items with integrity, honor, drive and a great attitude. Good things will eventually come your way.

Title: B.A Computer Science Vs B.S Inf Tech?


问:
Is validating HTML a thing of the past?
With us moving continually closer to HTML5 in terms of adoption, is writing HTML for validity something the web is rejecting, allowing us to straddle standards as the web continues to be in a perpetual state of transition to the "next" thing?

Is validation important?

If so, what is the net gain?

If not, why not?

答:
For once, Google penalizes websites with HTML errors, not sure how much.

They do the same with slowly loading pages, and HTML rendering is a CPU extensive task and doing something incorrectly forces the browser to "guess" the correction, this slows down the page rendering time and even worse browsers often guess wrong.

As a page gets complicated by other dynamically inserted elements with invalid HTML, chances that whatever was detected/ignored by the browser will now becomes in effect, and that cost more to fix than initially considering validating HTML.

Title: Is validating HTML a thing of the past?


答:
This genuinely isn't an attempt to start a flame war, I just wanted to address some of the points.

Probably the real reason that Qt isn't more widely used is that it's C++ and fewer people use c++ for desktop apps.

Qt is not a C++ library. It requires a separate compilation step,
  which makes the build process much more complicated when compared with
  most other libraries.

The vs-addin for visual studio does this automatically as does Qt's own commandline make process. The resource compiler used to build the dialogs for MFC is also a separate step but that's still c++.

Qt is a large amount of source, which must be present and preinstalled
  on any machine you use before compiling. This can make setting up a
  build environment much more tedious.

There is a binary download for each version of visual studio and the build from source is a single command. I don't see SDK source size is so much of a deal these days. Visual studio now installs all the C++ libs rather than letting you pick and choose, as a result the install size of the compiler is >1Gb.

It's available only under LGPL, which makes it difficult to use
  single-binary-deployment when one needs to release under a more
  restrictive or less restrictive license.

The LGPL only applies to the lib, it doesn't affect your code. Yes it means you have to ship DLLs rather than a single binary (unless you pay), but in a world where you need to download a Java runtime or a .Net update for a tiny util this isn't such a big deal. It's also less of a problem on platforms with a single ABI so that other Qt apps can share the libs.

In some cases, it just doesn't look like native programs look.
  Designing a single UI for all platforms inherently is not going to
  look right when moved from machine to machine, for various visual
  styling reasons.

It's supposed to use native widgets and themes. I must admit I do mostly technical apps so my users aren't too concerned about style.  Especially on windows the new fashion for having everything style itself as a smartphone widget means that there is less and less of a standard anyway.

Title: Why aren't more desktop apps written with Qt?

Body: As far as I know and have understood in my experience with Qt, it's a very good and easy to learn library. It has a very well designed API and is cross-platform, and these are just two of the many features that make it attractive. I'm interested to know why more programmers don't use Qt. Is there a deficiency which speaks against it? Which feature makes other libraries better than Qt? Is the issue related to licensing?</p>


问:
IPC in C under linux
I'm building a messaging solution with the followingsetup: all the messages are saved on a DB, two or more reader processes will read from this DB and send data to other process(es) which will send it over the network.

My approach is depicted below,

The following have 4 sender process with 4 fifos, and 2 readers with 2 fifos

reader0 ← read data from DB

reader1 ← read data from DB

sending part

network_handler0 ← network_handler_fifo0 ← reader0

network_handler1 ← network_handler_fifo1 ← reader1

network_handler2 ← network_handler_fifo2 ← reader0

network_handler3 ← network_handler_fifo3 ← reader1

receiving part

network_handler0 → reader_fifo0 → reader0 → write to DB

network_handler1 → reader_fifo1 → reader1 → write to DB

network_handler2 → reader_fifo0 → reader0 → write to DB

network_handler3 → reader_fifo1 → reader1 → write to DB

I have few problem with this setup, and please note that the number of processes could be more than that based on the environment, so I could make it 20 readers and 10 network_handlers or it it could as shown above.

The size of the buffer is 64K and the message size is 200k, is this small enough to make the write/read to/from fifo atomic?

How can make the processes aware of each other, so for example, reader 0 writes to network_handler_fifo0 and network_handler_fifo2, how can I make it start writing on other fifo if the current ones are full or their network_handlers are dea
d

I thought about making the reader process writing more general in writing, so for example it writes to all network fifos using lock mechanism and stop writing on the one that its process dead, I didn't use it as lock mechanism could slow thing down.

BTW, each network_handler is an SCTP association, so network_handler0 is association 0, network_handler1 is association 1 and so on.

Any idea is appreciated. I mean even if I have to change the setup above.

答:
Firstly, nothing is atomic in multi-processing situations. Do not expect to be able to ignore synchronisation just because you're using a relatively small payload. (even a 4-byte payload needs protection).

You might like to look at existing systems for this, I'd recommend ZeroMQ that offers you everything you need for this question.

Title: IPC in C under linux


答:
Unless you have clear contractual rights to the source code/app, then it is likely that the IP belongs to the company you work for. You could take it to a lawyer, but that will almost certainly burn those bridges you talked about.

I think you should chalk it up to experience. Next time, make sure you have the rights to your off-hours work (often you do not, if it is related to that work) - or simply only do it for pay or on a special agreement for the project.

You could lie of course; say you don't have the code itself, only the spreadsheet - or that its from an earlier project nbefoire you started for them (i.e. you changed the code, but do not own it - and thus they can't either). That's all up to you, but be careful and don't shoot yourself in the whatsits for the sake of a few nights of private work.


问:
Differences between HTML templating systems
I'm looking at backbone.js and noticed that it supports various templating systems (they specifically refer to Mustache.js, Haml-js, and Eco, but I understand it can support even more)(like Pure and dust.js)

Why are there so many of these? What makes one better or different to the others? Can anyone shed light on what their individual strengths and weaknesses are?

答: Here's a link to a LinkedIN Article where they detail their comparison and present their results as well as why did they select what they did (dust.js). This should give you some fair idea about the comparisons and what people are most likely to look for in templating solutions on client side and what are their strengths/weaknesses in those areas.</p>


答:
It really depends on contract you signed (read it!) and country you are in. There is also lot of potential problems, for example how would you prove that you wrote app in your free time? Judge may find it hard to believe that you worked for free, just for joy of programming...

Also right now that app is useless to you. Try to sell it, even if its just for peanuts.

I would recommend to  ask company for some paid time-off, to cover time you spend writing that app. There are some ways to put it, for example: "code is very ugly, contains offensive words and builds only on my home machine. I will need N days at home to clean it up."

If they refuse handover the code and find a better employer.


问:
Python and only Python for almost any programming tasks!
Am I wrong if I think that Python is all I need to master, in order to solve most of the common programming tasks?

EDIT
I'm not OK with learning new programming languages if they don't teach me new concepts of programming and problem solving; hence the idea behind mastering a modern, fast evolving, with a rich set of class libraries, widely used and documented, and of course has a "friendly" learning curve programming language.

I think that in the fast evolving tech industry, specialization is key to success.

答:
I don't necessarily know that there's anything wrong with this, but I wouldn't advise it for the sake of your career.  There are a couple of problems I can think of:

Python is hot now, but will it be in say 5-10 years?  I don't know about you, but I don't desire to become the future equivalent of a COBOL mainframe programmer.

Python won't be fast enough for every task.  You can do a lot with it, but there are tasks out there that Python by itself isn't fast enough for.  In these cases, you'll either need to know C (if there's one specific piece of the code that's going to run slow) or a JVM language (if you need the whole thing to be fast or are concerned with security).

I'm not OK with learning new programming languages if they don't teach me new concepts of programming and problem solving

I personally didn't see many advantages to trying Greek food until I did.  Once I did try it, I was regretful that I put it off for so long.  Of course, foods aren't programming languages, but the analogy actually isn't that far off.  Oftentimes, the only way to see the advantages of learning a new language is to try it out.

Paul Graham called it the "Blub paradox":

Programmers get very attached to their favorite languages, and I don't want to hurt anyone's feelings, so to explain this point I'm going to use a hypothetical language called Blub. Blub falls right in the middle of the abstractness continuum. It is not the most powerful language, but it is more powerful than Cobol or machine language.

And in fact, our hypothetical Blub programmer wouldn't use either of them. Of course he wouldn't program in machine language. That's what compilers are for. And as for Cobol, he doesn't know how anyone can get anything done with it. It doesn't even have x (Blub feature of your choice).

As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.

When we switch to the point of view of a programmer using any of the languages higher up the power continuum, however, we find that he in turn looks down upon Blub. How can you get anything done in Blub? It doesn't even have y.

By induction, the only programmers in a position to see all the differences in power between the various languages are those who understand the most powerful one. (This is probably what Eric Raymond meant about Lisp making you a better programmer.) You can't trust the opinions of the others, because of the Blub paradox: they're satisfied with whatever language they happen to use, because it dictates the way they think about programs.

If you get the opportunity, I recommend reading the entire article.

And lastly, I can see your point in terms of wanting to specialize.  But I don't think that's what you're trying to do.  By definition, doing "almost any programming task" isn't what I would consider specialization.  It sounds like you're using Python to generalize.  If you're looking to specialize, I'd recommend going into a specific field of programming like Machine Learning or Data Warehousing or Integration.  But a programming language by itself isn't much of a specialization.


答:
Wait! He is unpaid!

There is no way in hell that contract would stand up, assuming that a contract exists in the first place. Without just compensation contracts are not legally binding.

Tell them you are willing to license it if you want, but by no stretch of the imagination do they own it.


问:
Should Android development be done on Windows or OSX? Is there any difference?
I have the option to install the Android SDK on Windows or OSX.  Which platform provides a better (easier) development experience?

To keep this constructive, I'm looking for any difference that eliminates compatibility issues, ease of debugging, or compatibility with 3rd party utilities.

答:
Linux

I think you would want to use a Linux based OS for Developing Android applications seeing as how Android is a Linux Based OS, it's open source, it's free, and can run on a partition next to windows, and I think Mac Os as well (don't quote me on that though).   it's been a while since I opened up eclipse on my Linux box but I remember it being fairly quick.
and everything that you need will be available on Linux as well.

if you are unfamiliar with Linux it could be difficult to maneuver I guess, but you shouldn't have any compatibility issues using Linux.


答:
You may have a contractual obligation with the company but nothing with the director. Does this person have the right to take company property and give it to his brother or anyone else?

Find out where you legally stand with the company. Let the director know you plan on being upfront about everything. If he has a problem with this, too bad. If he's smart, he won't want the company to know he's doing some side deal.


答:
Deep under the hood, any functional language with heavy roots in lambda calculus is compiled to code, closely following some abstract computation model. For haskell it is STG-machine, for ocaml/caml-light it was CAM-machine. This execution model usually has something like local variables and clear route of execution and source code translates into code for abstract machine by clear, well-defined algorithm. So, breakpoints can be inserted in haskell (for example) code and something like local variables can be determined, when expression with breakpoint is evaluated. </p>

<p>For haskell and other lazy languages, however, the problem is that it does not make much good (except profiling). REPL allows coding expressions with easy, as no side-effects goes away from function body definition, so no real need to debug functions locally and asserts will locate error for sure. The real source of bugs usually is space leak due laziness in wrong place, and completely different tools, inspecting heap structure, are needed (and some are available). </p>

Title: Differences between imperative-language and functional-language debuggers

Body:
Up to now I have always worked with imperative languages like Pascal, C, C++, Java in a production environment, so I have experience with debuggers for these languages (Turbo Pascal, Turbo C, GDB / DDD, Visual Studio, Eclipse).

A debugger for an imperative language normally allows to

Set break points on statements, and execute the program until the next break point is encountered.

Execute the program one statement at a time, with the option of entering a function / method call or skipping over to the following statement.

When program execution is paused, one can examine the current state of the program, i.e.:

Inspect the contents of the stack to see the current nesting of function calls.

Inspect local variables, actual function parameters, global variables, and so on.

Since I have never worked with a functional programming language in a production environment, I was trying to figure out how a debugger for such a language would look like. For example:

How does the debugger walk through the program if there are no statements like in an imperative language? Where does one set break points?

In a language with lazy evaluation like Haskell, the sequence of function calls can be different from that of an eager language: will this make a big difference when trying to understand the call stack?

What about variables? Since there is no state, I imagine that a debugger will only show the variable bindings for the current scope (?), i.e. there will be no local or global variables changing value as I step through the program.

Summarizing, are there any general, common features of functional-language debuggers that clearly distinguish them from imperative-language debuggers?

Body:
Deep under the hood, any functional language with heavy roots in lambda calculus is compiled to code, closely following some abstract computation model. For haskell it is STG-machine, for ocaml/caml-light it was CAM-machine. This execution model usually has something like local variables and clear route of execution and source code translates into code for abstract machine by clear, well-defined algorithm. So, breakpoints can be inserted in haskell (for example) code and something like local variables can be determined, when expression with breakpoint is evaluated.

For haskell and other lazy languages, however, the problem is that it does not make much good (except profiling). REPL allows coding expressions with easy, as no side-effects goes away from function body definition, so no real need to debug functions locally and asserts will locate error for sure. The real source of bugs usually is space leak due laziness in wrong place, and completely different tools, inspecting heap structure, are needed (and some are available).


答:
If you are on IIS7 you could write a .NET HTTP Module and use that within your classic ASP's request pipeline. The main challenge would be how to figure out who is logged into your classic ASP app from ASP.NET.

If you are on IIS6 your only option is ISAPI.

HttpHandlers solve a different problem -- they handle a request after the modules have filtered and modified them. They are not suitable for this sort of filter function.

Title: Http handler for classic ASP application for introducing a layer between client and server

Body:
I've a huge classic ASP application where in thousands of users manage their company/business data. Currently this is not multi-user so that application users can create users and authorize them to access certain areas in the system.

I'm thinking of writing a handler which will act as middle man between client and server and go through every request and find out who the user is and whether he is authorized to access the data he is trying to.

For the moment ignore about the part how I'm going to check the authorization and all that stuff. Just want to know whether I can implement a ASP.net handler and use it as middle man for the requests coming for a asp website? I just want to read the url and see what is the page user is trying to access and what are the parameters he is passing in the url the posted data. Is this possible? I read that Asp.net handler cannot be used with asp website and I need to use isapi filter or extensions for that and that can be developed only c/c++.

Can anybody through some light on this and guide me whether I'm in the right direction or not?


问:
Appropriate use of SQL CLR
We have some back end processes that runs* on our sql server (SQL Server), they involve processing claims.  This requires both data manipulation (biz logic) and data read/write to tables.  The biz logic contained should never be used by any of our end user (web/fat client) applications, just for this (runs once, nightly) process.

* By "runs" I mean it runs, but it is slow, full or errors, and is a nightmare to maintain, we're looking to redo this to fix these issues.

One thing I'm trying to avoid is writing a 3000+ line Stored Proc (we have a few) that does everything, it isn't maintainable.

My initial thoughts/approach is to use:

SQL CLR (Sql 2012 / C# .Net 4.0) for the biz logic (there will be some complexity to the logic)

Entity Framework for any simple CRUD read/write

Stored Procedures for any complex data read/writes.

There will be a final step of writing our end results (data) to other companies databases, but that's someone else responsibility.

I'd like some thoughts about this approach if it is a good one (is there a better approach?), any suggestions would be appreciated.

答:
Since you don't really need to run this "in" SQL Server and you don't need to reuse any of the code anywhere else in SQL Server, create another server application in the language of your choice and have it triggered by a scheduler. This could give you the option to off-load the number crunching on another server. Using stored procs are still an option if you need it.

You may not have CLR enabled, so why bother just for this?

Title: Appropriate use of SQL CLR


答:
If I were the OP, I would ignore every answer posted!

You are asking a LEGAL question and getting answers from people who ARE NOT LAWYERS!

Simply put, you need to consult with a lawyer in your jurisdiction.

The answer to your question may be different based on your locality.

A lot of people here (who are not lawyers) talk about "contracts" however, just because something is written on paper and called a contract, does NOT necessarily make it legally binding.  In contrast to that, just because something hasnt been written into a legally binding contact, doesnt mean you have free reign.

Again, the only way to get a proper answer is to consult with a lawyer.

PS:  Im not knocking people's intelligence here.  Im sure there are a lot of extremely gifted developers here.  It just seems people love to give legal advice and swear that it is fact, when the reality is, they have no idea what they are talking about.


答: Personally, I prefer only using sp's when the process is only at the database level, e.g. populating some tables based on values in other tables, such as doing monthly data updates, etc. If for no other reason, it's difficult (at least in my experience) to properly version sp's, so I like to leave out any business logic from the database if at all possible.</p>

Title: Appropriate use of SQL CLR

Body:
We have some back end processes that runs* on our sql server (SQL Server), they involve processing claims.  This requires both data manipulation (biz logic) and data read/write to tables.  The biz logic contained should never be used by any of our end user (web/fat client) applications, just for this (runs once, nightly) process.

* By "runs" I mean it runs, but it is slow, full or errors, and is a nightmare to maintain, we're looking to redo this to fix these issues.

One thing I'm trying to avoid is writing a 3000+ line Stored Proc (we have a few) that does everything, it isn't maintainable.

My initial thoughts/approach is to use:

SQL CLR (Sql 2012 / C# .Net 4.0) for the biz logic (there will be some complexity to the logic)

Entity Framework for any simple CRUD read/write

Stored Procedures for any complex data read/writes.

There will be a final step of writing our end results (data) to other companies databases, but that's someone else responsibility.

I'd like some thoughts about this approach if it is a good one (is there a better approach?), any suggestions would be appreciated.


问:
Algorithmic problem - quickly finding all #'s where value %x is some given value
Problem I'm trying to solve, apologies in advance for the length:

Given a large number of stored records, each with a unique (String) field S. I'd like to be able to find through an indexed query all records where Hash(S) % N == K for any arbitrary N, K (e.g. given a million strings, find all strings where HashCode(s) % 17 = 5. Is there some way of memoizing this so that we can quickly answer any question of this form without doing the % on every value?

The motivation for this is a system of N distributed nodes, where each record has to be assigned to at least one node. The nodes are numbered 0 - (K-1) , and each node has to load up all of the records that match it's number:

If we have 3 nodes

Node 0 loads all records where Hash % 3 ==0

Node 1 loads all records where Hash % 3 ==1

Node 2 loads all records where Hash % 3 ==2

adding a 4th node, obviously all the assignments have to be recomputed -

Node 0 loads all records where Hash % 4 ==0

...

etc

I'd like to easily find these records through an indexed query without having to compute the mod individually.

The best I've been able to come up with so far:

If we take the prime factors of N (p1 * p2 * ... )

if N % M == I then p % M == I % p for all of N's prime factors

e.g. 10 nodes :

N % 10 == 6 then

N % 2 = 0 == 6 %2

N % 5 = 1 == 6 %5

so storing an array of the "%" of N for the first "reasonable" number of primes for my data set should be helpful. For example in the above example we store the hash and the primes

HASH  PRIMES (array of %2, %3, %5, %7, ... ])

16    [0 1 1 2 .. ]

so looking for N%10 == 6 is equivalent to looking for all values where array[1]==1 and array[2] == 1.

However, this breaks at the first prime larger than the highest number I'm storing in the factor table. Is there a better way?

答: How important is it that formula be "Hash % num_machines"?  This formula is used for distributed caches, like memcached.  It works great until you add/remove nodes.  At that point, the advice is to abandon it and use consistent hashing.</p>


问:
How should I deal with Time Zones in a .NET WCF application?
Our company runs a SaaS application where users log in from across the world (although mostly in the US).  We store all our time relevant information as UTC, but we need to display times using local time.  The application is web based, and we would like to "auto-detect" the user's Time Zone by using javascript to determine their UTC offsets during various times of the year.  The user's offset info would be passed to our server in their first request and the server will look up all the Time Zones that it knows about and see which valid time zones match.

I'd like to use the built in TimeZoneInfo object, but I understand that

```<code>TimeZoneInfo.GetSystemTimeZones();
</code>```

relies on the server's registry settings.  We currently have 18 load balanced web servers that host our WCF service layer, and I believe our TechOps team is vigilant in making sure that all servers are patched with the same service pack at all times.

I also need to pay special attention to the various US Time Zones, specifically Pacific, Mountain, Central and Eastern.  Can I assume that the string based Id field will not change anytime soon?  For example, if I call

```<code>TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time")
</code>```

I want the appropriate TimeZoneInfo object to be returned.

So a few questions:

What is the best way to deal with time zones, especially when it comes to the changing rules (US time zone rules changed in 2006) and determining offsets.  Should I be trying something else?  Keep in mind that the product team doesn't want the user to have to select their time zone and they are fine with time zones being inaccurately reported under certain  conditions (e.g. if the user is in Mexico, it is ok to be reported as "Pacific Standard Time" instead of the more accurate "Pacific Standard Time (Mexico)".

If I assume that all of our load balanced web servers are always running the same OS version and patch level, can I assume that I will get consistent results?

Are there any other things I need to consider?

答: One other thing to consider: there is a difference between xST and xDT; for example, Arizona is MST, i.e. they do not adhere to DST, so effectively they're in Mountain during the winter and Pacific during the summer.</p>


答:
Since you're asking about javascript mainly, by using coffeescript you can have a named argument like syntax, super easy:

```<code># declare method, ={} declares a default value to prevent null reference errors
doSomething = ({preventUndo} = {}) ->
  if preventUndo
    undo = no
  else
    undo = yes

#call method
doSomething preventUndo: yes
#or
doSomething(preventUndo: yes)
</code>```

compiles to

```<code>var doSomething;

doSomething = function(_arg) {
  var preventUndo, undo;
  preventUndo = (_arg != null ? _arg : {}).preventUndo;
  if (preventUndo) {
    return undo = false;
  } else {
    return undo = true;
  }
};

doSomething({
  preventUndo: true
});

doSomething({
  preventUndo: true
});
</code>```

Have some fun at http://js2coffee.org/ to try the possibilities

Title: Is defining a variable to name a method argument a good practice?

Body:
For the sake of readability I often find myself defining temporary variables while calling functions, such as the following code

```<code>var preventUndo = true;
doSomething(preventUndo);
</code>```

The shorter version of this to this would be,

```<code>doSomething(true);
</code>```

But when I come back to the code I often wonder what true refers to. Is there a convention for this kind of conundrum?

Body:
Since you're asking about javascript mainly, by using coffeescript you can have a named argument like syntax, super easy:

# declare method, ={} declares a default value to prevent null reference errors
doSomething = ({preventUndo} = {}) ->
  if preventUndo
    undo = no
  else
    undo = yes

#call method
doSomething preventUndo: yes
#or
doSomething(preventUndo: yes)

compiles to

var doSomething;

doSomething = function(_arg) {
  var preventUndo, undo;
  preventUndo = (_arg != null ? _arg : {}).preventUndo;
  if (preventUndo) {
    return undo = false;
  } else {
    return undo = true;
  }
};

doSomething({
  preventUndo: true
});

doSomething({
  preventUndo: true
});

Have some fun at http://js2coffee.org/ to try the possibilities


问:
Can my company give IP rights away for an application I wrote off hours to another startup?
I am an intern for a health company (unpaid), let's call it Company A and I noticed that they are using a lot of paper form for things that can be done on the computer. Excel files for things that shouldn't be in Excel. So I wanted to improve on my programming and figured that it was the best opportunity to do.

I developed a couple of apps for their use. All these applications were outside company time. One application I did and they love and one of the director has a brother who has a health start up company. He wants me to give over my source code so his brother's company can further develop it and maybe sell it (I am out of the equation).

I have no intention of handing over my code as I put a lot of time outside doing it but I also don't want to burn bridges with anyone in the company. I can't go to the director and tell him "I don't think so".

I am fine with demoing to the brother how it works but the line is giving up my code. If they want to build something like it then they can go right ahead I have no problem with it.

What is the correct way of approaching this and do they have the right to do this to me?

Edit: there is no contract I never signed anything

答:
First off, this on the surface seems very sleazy.  Contract or not.

Are you sure that the manager is even aware that this was done off hours, in your own time?  He may be under the impression you did this while at the office.  I would politely thank him for his interest, but note that this was something you did on your own time.  If they would like to talk about aquiring the source code or hiring you to expand on it, you'd be open to the idea.  After all, you have already demonstrated you would be quite an asset to them.

"Edit: there is no contract I never signed anything"

With this, I think the words you are looking for, then, are:

Show Me the Money

Do NOT worry about burning bridges here.  If this company is actually sleazy enough to 'demand' source code you wrote off hours as an unpaid intern and generally take advantage of you, then you arent going to want a long career with them anyways.


问:
How can I make refactoring a priority for my team?
The codebase I work with daily has no automated tests, inconsistent naming and tons of comments like "Why is this here?", "Not sure if this is needed" or "This method isn't named right" and the code is littered with "Changelogs" despite the fact we use source control. Suffice it to say, our codebase could use refactoring.

We always have tasks to fix bugs or add new features, so no time is put aside to refactor code to be better and more modular, and it doesn't seem to be a high priority.

How can I demonstrate the value of refactoring such that it gets added to our task lists? Is it worth it to just refactor as I go, asking for forgiveness rather than permission?

答:
Here is what I do in such situations (in the 15 years of my career as a developer I have come across such code almost every day)

Lead by example - I make sure to re-factor the code I touch. I ruthlessly delete old commented out code and large paragraphs of comments.

Ask for re-factoring every time I am asked to review a code change, without which I do not approve the code review.

Slowly people see the change, when the code become leaner, more readable and thereby less buggy. It takes time but slowly the whole team appreciates and adopts the practice.

The management never sets aside time for re-factoring code (they never have enough resources!), so doing it slowly and steadily is a right approach.


问:
Learning embedded systems development without supervision
I have graduated this year and got my first job involved with C programming, Linux administration and embedded systems development. I feel quite content with my job, but I'm afraid I won't become a successful programmer in this field. I'm a lone developer on my job now, with my teammates being hardware experts, there is no one to guide me or teach me in the ways of embedded programming, I have to study all on my own.

So here are my questions. Is it possible to become a good embedded systems developer starting from an entry level position without any supervision by senior programmers? How could I become one (perhaps with the help of forums, IRC channels, good textbooks)? How long would it take?

UPDATE: So far, I have received a handful of helpful answers, but I realized that I need some specific pointers on the subject.

So, here are my particular questions:

What are some good textbooks one can use to learn embedded development?

What specialized online communities can be helpful for an aspiring embedded developer (not counting general stuff like Stack Overflow, Reddit and so on)?

What are the most interesting blogs dedicated to embedded development?

答:
It has been a while since you asked this question, so I hope you are well on your way.  Here are a few additional suggestions that I hope will help.

Stack Exchange and Blogs

Amazingly enough, Stack Exchange does not have its own Q & A site for Embedded systems.  One was proposed about two years ago, but it is still in the commitment phase, languishing without enough people signing up to support it.  If you want to make a difference, go here:

http://area51.stackexchange.com/proposals/15961/embedded-system-design-and-development

Read the proposal and if you agree, click commit to get involved.

Linked In also has an Embedded Systems group, plus a couple closely related groups that may be of interest:

Embedded Systems

Firmware

ARM

Web Resources

EETimes has features about embedded systems.

http://www.eetimes.com/design/embedded

Dr. Dobbs is a long time friend to programmers of all types and has great stuff on embedded.

http://www.drdobbs.com/embedded-systems

The Arduino community is large, enthusiastic, and has removed many barriers to entry for embedded programming including price and prior training.

http://www.arduino.cc/

If you are a female software developer or an unenlightened male developer who things embedded systems is mainly a "Good-Old-Boys" club, check out this site.  The author is an MIT graduate, had done edgy, out of the box (or sometimes in the box stuff, like her Altoids-box iPhone charger), and seems to be very prolific in her designing, writing, and video blogging.

http://www.youtube.com/watch?v=QkmtHqsYCbw&feature=player_embedded#!

http://www.adafruit.com/tutorials

Many vendors will have extensive collections of data sheets, application notes, white papers, and free or evaluation copies of development tools.  Top companies in this space include ARM, Atmel, Freescale, intel, Microchip Technologies, NXP (formerly Phillips), TI, and many others.

Books

Not sure if you can find it, but I have a book I think tells a lot of the story for embedded systems in terms to tools (assemblers, linkers, loaders) and fundamental things that happen in microprocessors (interrupts, I/O, simple task managers and schedulers, simple file structures).  Systems Programming for Small Computers, Daniel Marcellus.

A more modern reference is Embedded Linux Primer.  Early chapters discuss the rationale behind running Linux on embedded systems and some of the mechanics involved.  Chapter 3 has a nice discussion of processors + support chipsets and SOC (System On a Chip) options that can be considered for use in current designs.  Actually, the target is moving, so it gives a starting point that is contemporary with the publication of the book.  Chapter 3 is great, but should be supplemented with some further research on the web and in discussion with vendors.  Typically, the electrical engineer and lead software engineers on the project will pick the processor, so if you are in a company and learning embedded systems, do your deep dive on the hardware they pick.

Later chapters include extensive descriptions about many practical aspects of targeting Linux to hardware, but partnership with the vendor and use of a pretty standard reference design might reduce the effort significantly.


问:
Why is Java the lingua franca at so many institutions?
EDIT: This question at first seems to be bashing Java, and I guess at this point it is a bit. However, the bigger point I am trying to make is why any one single language is chosen as the one end all be all solution to all problems. Java happens to be the one that's used so that's the one I had to beat on here, but I'm not intentionality ripping Java a new one :)

I don't like Java in most academic settings. I'm not saying the language itself is bad -- it has several extremely desirable aspects, most importantly the ability to run without recompilation on most any platform. Nothing wrong with using the language for Your Next App ^TM. (Not something I would personally do, but that's more because I have less experience with it, rather than it's design being poor)

I think it is a waste that high level CS courses are taught using Java as a language. Too many of my co-students cannot program worth a damn, because they don't know how to work in a non-garbage-collected world. They don't fundamentally understand the machines they are programming for. When someone can work outside of a garbage collected world, they can work inside of one, but not vice versa. GC is a tool, not a crutch. But the way it is used to teach computer science students is a as a crutch.

Computer science should not teach an entire suite of courses tailored to a single language. Students leave with the idea that all good design is idiomatic Java design, and that Object Oriented Design is the ONE TRUE WAY THAT IS THE ONLY WAY THINGS CAN BE DONE. Other languages, at least one of them not being a garbage collected language, should be used in teaching, in order to give the graduate a better understanding of the machines.

It is an embarrassment that somebody with a PHD in CS from a respected institution cannot program their way out of a paper bag.

What's worse, is that when I talk to those CS professors who actually do understand how things operate, they share feelings like this, that we're doing a disservice to our students by doing everything in Java. (Note that the above would be the same if I replaced it with any other language, generally using a single language is the problem, not Java itself)

In total, I feel I can no longer respect any kind of degree at all -- when I can't see those around me able to program their way out of fizzbuzz problems.

Why/how did it get to be this way?

答:
As always it is a question of what you want to teach and how much time you have to do it in.

Doing things in Java means that you don't have to deal with stray pointers and free/malloc.  That means quite fewer hard-to-find bugs.

This doesn't mean that  you shouldn't learn about the underlying machine - which you must to be good at the trade - but that perhaps you should choose the right tool for the job.  High-level algorithms are perhaps not the best topic for the assembler course.


问:
Should a stack trace be in the error message presented to the user?
I've got a bit of an argument at my workplace and I'm trying to figure out who is right, and what is the right thing to do.

Context: An intranet web application that our customers use for accounting and other ERP stuff.

I'm of the opinion that an error message presented to the user (when things crash) should include as much information as possible, including the stack trace. Of course, it has to start with a nice "An Error has occurred, please submit the below information to the developers" in large, friendly letters.

My reasoning is that a screenshot of the crashed application will often be the only easily available source of information. Sure, you can try to get a hold of the client's systems administrator(s), attempt to explain where your log files are etc., but that will probably be slow and painful (talking to the client representatives mostly is).

Also, having an immediate and full information is extremely useful in development where you don't have to go hunting through the log files to find what you need on every exception. But that could be solved with a configuration switch.

Unfortunately there has been some kind of "Security audit" (no idea how they did that without the sources), and they complained about the full exception messages citing them as a security threat. Naturally, the clients (at least one that I know of) has taken this at face value and now demands that the messages be cleaned.

I fail to see how a potential attacker could use a stack trace to figure anything out he couldn't have figured out before. Are there any examples, any documented proof of anyone ever doing that? I think that we should fight this foolish idea, but perhaps I'm the fool here, so...

Who's right?

答:
You might consider not showing a stack trace for the following reasons.

Security

Showing a stack trace reveals possible attack surfaces to would be hackers. Intranets are not immune to hacking. It would reflect badly on you if your network was hacked because of an application you are responsible for

User Experience

For the user's best experience, a strack trace is too much information. Yes, the proper information about an error condition should be logged and given attention by an engineer. However, aksing a user to do what you can automate will not be the best for the user.

Your Reputation

Whenever a stack trace is shown on a website, it looks bad. Most people don't have any idea what it is and that makes them feel like the website isn't friendly to them. To those who do know what it is, it may be an indication that the application was not well thought out. Many badly written applications show stack traces way too often because it is the default in some frameworks like ASP.Net.

ContentLicense: CC BY-SA 4.0


答:
You say you are not getting paid, and there is no contract.  Quit now.  Go work for someone that doesn't expect something for nothing.

Do not give them your code.

If you are serious about not wanting to burn any bridges with these people (although I can't imagine any reason you'd want to work for nothing, unless you're already a millionaire or something), then I guess you have to do what they say.  In that case, someone else's answer seemed pretty good:  release it as open source.

You say you did not sign anything, which means there is no written contract.  Is there a verbal contract?  Are there witnesses to the verbal contract?  If not, then you have no legal obligation to these people, and certainly no moral obligation.  The only reason you'd want to give them your code is in the hope that they will either start paying you, or give you a great recommendation to someone else that will start paying you.  I don't think that is going to happen; they will probably just keep trying to take advantage of you until you quit.


问:
How to fix a project with basically no structure?
I've been working on a software project mostly solo for over 5 years. It was a mess to begin with (I am the third or fourth developer to be working on it), and although it's less of a mess now it is still incredibly disorganized. The rate of progress in getting it under control is glacial and I'm starting to feel despondent over the state that it's in. How do I really start fixing it?

Project specifics: It is a sales program written almost entirely in Visual Basic Classic (VB6) with a MySQL back end and a reporting engine written in C#. The C# reporting module is a joy to work on, it was only just written in the past couple years and before that all reports were done in Crystal Reports 9 (yes, we still have some reports that rely on it).

The actual program itself, however, is a complete disaster. There are not quite 90k LOC total, and about 10k lines of comments (mostly not documentation, but old code that's been commented out). 158 form files, and 80 module files. I have no idea how many of those are actually used, because some features of the program are simply deprecated and (uh, sometimes) noted as such without having the associated code removed from the program. I would guess that only 50% of the code is in actual productive use.

I am afraid of touching a lot of the code just because I am not sure if I'm breaking something that one obscure client relies on, it's happened on more occasions than I can count. It's like there are landmines strewn throughout the code.

There is not really any structure to the project. It is not object oriented except in the few places I have had the patience to reform so far. If you need to get data on a form, you instantiate a database object, declare your query right there in the function, execute it and do what you will with the dataset.

When I began working on the project there was no source control in use. I tried to encourage the other people I was working on to use it, but I was the new guy and my attempts to get people to use subversion all but failed. The company's lead developer finally caught a mercurial bug in the last couple years and he's made sure that all developers do use source control on all projects now, so at least that's some progress.

I think if I was able to work on reforming the project full time I would be able to make decent progress and maybe even have an estimate for how long it would take me to fully makeover the project, but it is in active use and I am constantly being asked to put out fires, fix bugs, add features, etc. etc.

So how do I start to really fix this project? Try to tool VB6 with another language? Try and rewrite the program in my spare time? Or is this completely hopeless?

Update

After this post I went back to the project with renewed zeal, but fell back into hopelessness within a few months after seeing such a slow rate of progress. I then repeated this cycle 2 or 3 more times over the next year or so.

I have since moved on to a different job. Although after so many years of vb6, and only peripheral experience with other technologies the search was difficult and I faced many rejections along the way (around a dozen interviews over the course of a year). My advice to others in this situation is to consider leaving for this factor alone. Consider the damage you can do to your career by staying in a dead end position such as this.

答:
Although it puts a LOT of emphasis on unit-testing your application which, although a very important thing to do, is something quite hard to do in VB6, Steven McConnell wrote an excellent book about how to tackle on such a projet.

Take a look at it:

Steven C. MCCONNELL: Working Effectively with Legacy Code, Second
  Edition. Microsoft Press, june 2004.

Basically, his point is to take it slowly, one bit at a time. He also recommends to begin by using refactoring techniques that are very unlikely to break anything, sometimes making it a bit worse in the short term, and to start using more advanced techniques as the code is getting cleaner and has unit tests to support it.


答: Bad news. As a non-developer, something you developed on your own time that looks brilliant to a non-technical manager is unlikely worth much of anything on the commercial market, so while it may be useful to both your company and the brother's company, there will likely need to be several hundred hours of additional programming and testing required to make it a marketable product, dwarfing the effort you put into it to create the original program.</p>


问:
How do you support your code post employment end?
What is the process for leaving a company (or even a group/division) in terms of code support?

Is it best to handle all questions? Do you give the remaining developers access to yourself as a future resource? If so, is there a way to not give full access?

I've experienced first hand where answers about the general software arthitecture from the initial developer would be invaluable.

I understand that if serious assistance is needed, than it becomes a typical case of employment negotiation as a support contract. However, should serious assistance be required, what steps can you make to ease that process of contacting you?

I was thinking of doing something like making a (YOUR_NAME)_codesupport @ (YOUR_FAVORITE_EMAIL_CLIENT).com address.

My Situation Specifics:

I'm a co-op student, and as such bounce around companies on 4-month stints. This means introducing myself to a lot of new code bases, as well as leaving a fair share of orphaned code behind when I leave a company. I feel bad if I leave junk code around.

答: Normally you prepare for this about 2 weeks before your scheduled end date. Plan some time for a knowledge transfer to another member of the team and try to make sure that they can support the code before you've packed up your desk. Don't set yourself up to be on perpetual support by putting your contact info in the code. If the situation is so serious that no one but you can fix it, they can probably get your contact info from HR.


答:
Train up the person replacing you as much as you can (if there is someone).

I find it best to leave documentation with the code, preferably checked into source control if there isn't a central documentation system.  Whatever you do, document as much as you can about:

How to get a completely working system up and running on another developer's computer

How to build

How to deploy

Put a copy of everything in a central place.

Email all the details to any stakeholders.

I always make sure they understand they can call me if they have a question, like where did this go, etc.  It's quite common for them to call you later and ask if you want to do work on the side if they're in a bind.  That's up to you based on your new situation and employment contract.  Nothing wrong with saying, "sorry, I just don't have the time right now."  It's almost always true anyway.

Title: How do you support your code post employment end?

Body:
What is the process for leaving a company (or even a group/division) in terms of code support?

Is it best to handle all questions? Do you give the remaining developers access to yourself as a future resource? If so, is there a way to not give full access?

I've experienced first hand where answers about the general software arthitecture from the initial developer would be invaluable.

I understand that if serious assistance is needed, than it becomes a typical case of employment negotiation as a support contract. However, should serious assistance be required, what steps can you make to ease that process of contacting you?

I was thinking of doing something like making a (YOUR_NAME)_codesupport @ (YOUR_FAVORITE_EMAIL_CLIENT).com address.

My Situation Specifics:

I'm a co-op student, and as such bounce around companies on 4-month stints. This means introducing myself to a lot of new code bases, as well as leaving a fair share of orphaned code behind when I leave a company. I feel bad if I leave junk code around.


答:
Personally, I'd just choose the degree that interests you the most.  I don't have a degree and I consider myself to be a good programmer.  That's not to say that you shouldn't.  I'm a bit of an edge case:  school just isn't my thing.

My point is that I wouldn't worry about it too much.  In the grand scheme of things, your degree might make a difference when you get your first job.  Beyond that, most people simply don't care.  The ultimate question they have to answer is "Can this person get the job done?" not "Did this person get a good enough degree?".  Remember, you're going to be spending at least 4 years of your life on this.  Your first priority should be to make sure that you can make it through those 4 years.

Title: B.A Computer Science Vs B.S Inf Tech?

Body:
Would a recruiter prefer a B.A in Comp Science from a more prestigious university or a B.S in Inf Tech from just an average university? Would it matter for someone already established in the field with plenty of experience?

The only difference in the B.A and B.S is essentially the mathematics.  The B.S is geared for those going on to master's programs, although one isn't excluded from going on to a masters program with a BA, many do require more mathematics.

Just for those curious, the information tech degree is typically geared more to real-world problems then the computer science and the quality of it will vary widely. Some inf tech programs are as in-depth as an ABET C.S degree, the information tech from Drexel looks extremely strong. The Management Information Systems is generally provided via the business school and is more of a traditional business degree.

I'm not sure really how well versed the recruiters/g.p are in the actual differences in all of these programs. Some non ABET BS Comp Science may only require 1 or 2 Calculus versus the ABET certified programs.


答:
Totally Different Answer

It seems to me as though the other answers were clearly provided by developers. Developers tend to have a "black and white" approach to things - but I think that's completely the wrong approach here.

Here's how I'd handle it:

First, determine for yourself what you believe the product is worth to them (not you).

Next, determine if you'd be willing to accept whatever value you came up with in the first step if they offered it to you. If not, consider what your other alternatives are for monetizing the product and, especially, how much extra time/money you'd have to spend on making the product marketable. (An office? A website? Tech support staff? Programmers? Marketing in trade magazines or tradeshows? Few products really get started for south of a million bucks)

Finally, go ahead and demo the product to the brother. I'm not sure if they specifically told you they wanted to pay you nothing for it - or if you just assumed as much - but, I'd simply chalk it up to an "interesting starting negotiating position".

Lastly, if they see value in your product, consider the fact that you may be able to get compensated for it even if the compensation doesn't come directly in the form of a check. Maybe the brother would like to hire you on to continue developing it. Would this be an option for you, or something you'd be interested in?

It's always nice to have a product someone else wants to use. Be gracious and put on your "salesperson" face. No one wants to buy from a jerk.

I've had customers rub me the wrong way in the past - but, if you can grin and bear it, they may turn into a great customer.

You don't have to be taken for a sucker - but that doesn't mean you have to be awkward about telling them what you'd like to see from them to make the deal work.

Good luck.


答:
If the process can be completed in the database, stick to stored procedures as these should perform best.

You are right in trying to avoid a procedure that contains many lines of code. If this is the case then split the procedure up into a number of smaller procedures. There may be commonality between these, so you can introduce re-use with the use of variables passed to your procedures. How you call these will depend on the system design - you may need a Business layer in the application or a master stored procedure to do this.

Title: Appropriate use of SQL CLR


答: IIRC unpaid interns technically aren't suppose to do regular employees work (otherwise they MUST be paid). They just look, try to do small projects for themselves, etc. Tell your boss your happy to demo it and your more willing to sell it to them if they are interested (and reasonable). If he/they say something about selling or giving it for free just say its your own project and you were interested in doing something outside the company with it. Its not something small that you would give away for free.


问:
Trac/SVN to DVCS Migration
The project I'm currently working on is using Trac, with SVN integration. It's worked great until now. Now, however, we've taken on some additional developers and we're running into issues with branching and merging. Because of this, I think a move to a distributed version control system is in order.

The problem is that Trac is very closely integrated with the SVN repository. We have tight integration between the tickets and the revision numbers of code changes corresponding to those tickets. In addition we have a support wiki that has a lot of data that helps the tech. support team. Is there a way we can migrate to git or mercurial without losing the benefits of Trac? I've looked at the git plugin for Trac, and I'm unsure of how well it works. Has anyone here used it with a project that's been migrated from SVN?

EDIT: I should note that the most important priority for us is maintaining the links between Trac tickets and the corresponding changesets in SVN. That's a tool that we use every day, and it provides an easy way to jump to code changes when reviewing tickets. Wiki migration would be nice to have, but if it's not possible, we can continue to run the old system whilst we write some kind of a one-off script to migrate the content.

答:
Your first question should be "how do we branch/merge better" rather than "I've heard good things about cool tech x, lets try it". If you really want the latter, then you should be setting up a test/evaluation system and making sure that it not only solves the problems you have, but also doesn't introduce different problems.

So why is svn merging such a problem for you? I hope you're running a later version (1.5+) as I've seen companies sticking with 1.3 for years.

Merging in SVN does work, its not broken, so what are the problems your new developers (I assume the old ones are working with it fine....) are having. They need to be educated in how to use the system better. We all know any system can be broken by "stupid users", are these guys checking in by simply overwriting conflicts with their code? Are they failing to merge with the right option? Do you have reintegration merging set up and are they not closing their old branches after a reintegrate?

Title: Trac/SVN to DVCS Migration


答:
How do you support your code post employment end?

You don't. That's why it's called the end.

If they'd be surprised to see you walk through the door and start using their equipment a month after you left, you should be surprised to have them call you up and ask a bunch of questions a month after you left.

Okay, more realistically, depending on the situation, you might offer to answer questions by phone or e-mail for a bit, especially if you a) would like to go back there, b) are friends with the people who work there, c) are still depending on them for a good review, d) feel pretty confident that the company won't abuse your goodwill gesture, and/or e) the company is willing to compensate you for any non-trivial additional support.

This means introducing myself to a lot of new code bases

That's a good skill to develop -- you'll need it.

as well as leaving a fair share of orphaned code behind when I leave a company.

Part of your job while you're still working there is to document what you've done, or at least make sure that some of the other people working there have a clear understanding of it. That's something that's in the company's interest, and they should make sure they have what you need while you're still there.

I feel bad if I leave junk code around.

Don't write junk code in the first place. If your previously-good code becomes junk (obsolete, no longer needed, etc.) before you leave, then clean it up before you leave. If your code isn't junk when you leave, then what happens to it afterward isn't something you should worry about.


问:
How do I create my own programming language and a compiler for it
I am thorough with programming and have come across languages including BASIC, FORTRAN, COBOL, LISP, LOGO, Java, C++, C, MATLAB, Mathematica, Python, Ruby, Perl, JavaScript, Assembly and so on. I can't understand how people create programming languages and devise compilers for it. I also couldn't understand how people create OS like Windows, Mac, UNIX, DOS and so on. The other thing that is mysterious to me is how people create libraries like OpenGL, OpenCL, OpenCV, Cocoa, MFC and so on. The last thing I am unable to figure out is how scientists devise an assembly language and an assembler for a microprocessor. I would really like to learn all of these stuff and I am 15 years old. I always wanted to be a computer scientist someone like Babbage, Turing, Shannon, or Dennis Ritchie.

I have already read Aho's Compiler Design and Tanenbaum's OS concepts book and they all only discuss concepts and code in a high level. They don't go into the details and nuances and how to devise a compiler or operating system. I want a concrete understanding so that I can create one myself and not just an understanding of what a thread, semaphore, process, or parsing is. I asked my brother about all this. He is a SB student in EECS at MIT and hasn't got a clue of how to actually create all these stuff in the real world. All he knows is just an understanding of Compiler Design and OS concepts like the ones that you guys have mentioned (i.e. like Thread, Synchronization, Concurrency, memory management, Lexical Analysis, Intermediate code generation and so on)

答:
Coursera is offering a free 10-week course on compilers soon. You can also have a look at the lecture videos here. The lecture videos include the following topics:

The Cool Programming Language

Lexical analysis

Finite Automata

Parsing

Top-Down Parsing

Bottom-Up Parsing

Semantic Analysis and Type Checking

Cool Type Checking

Runtime Organization

Code Generation

Opertational Semantics

Local Optimization

Global Optimization

Register Allocation

Garbage Collection

Java

You may also be interested in some podcasts about compiler construction.

OwnerDisplayName: Dave