language-agnostic

Virtual addresses problem

I am stuck on this problem which I am studying for an exam tomorrow. (I understand the concept of virtual vs. physical addresses, page frames, address bus, etc.) If you're using 4K pages with 128K of RAM and a 32 bit address bus, how large could a virtual address be? How many regular page frames could you have? EDIT: I believe the ans...

Dealing with god objects

I work in a medium sized team and I run into these painfully large class files on a regular basis. My first tendency is to go at them with a knife, but that usually just makes matters worse and puts me into a bad state of mind. For example, imagine you were just given a windows service to work on. Now there is a bug in this service and ...

Literature and Tutorials for Writing a Ray Tracer

I am interested in finding recommendations on books on writing a raytracer, simple and clear implementations of ray tracing that can be seen on the web, and online resources on introductory raytracing. Ideally, the approach would be incremental and tutorial in style, and explain both the programming techniques and underyling mathematics...

Is there a free (or low cost) database of first and last names?

I am looking for a reference database that can be used to test for possible name typos in a contact database. This is for a batch process, so performance isn't a real issue. Ideally I'd like a comprehensive database, but even something like "top 5000" would go a long way. Thanks! ...

Which development skills have you acquired after 7-10++ years of experience in OO development ?

Some development skills, like refactoring operations, feel like they have an almost unlimited pontential for learning - only the fool will say he's finished learning that. Other skills are bound to specific tools, and being good developers we learn new tools most of the time. But some skills are related to how you think about code and ...

Should I prepare my code for future changes?

Should I prepare my code for possible/predicted future changes so that it's easier to make these changes even if I don't really know if these changes will be required anytime? ...

How do you manage external dependencies for your application?

There are many types of external dependencies. Interfacing with external applications, components or services (e.g. Outlook to send emails, TWAIN or WIA for scanning, ActiveX objects and Web services for various purposes, and so on). What is your strategy for making sure that your application is robust, and can run even when such extern...

Do static classes cause performance issues on multi-core systems?

Hi folks, the other day a colleague of mine stated that using static classes can cause performance issues on multi-core systems, because the static instance cannot be shared between the processor caches. Is that right? Are there some benchmarks around proofing this statement? This statement was made in the context of .Net development (w...

Poll: Correct behavior of equality when passed object does not match LHS type?

I asked a related question about findbugs, but let's ask a more general question. Suppose that I am working with an object-oriented language in which polymorphism is possible. Suppose that the language supports static type checking (e.g., Java, C++) Suppose that the language does not allow variance in parameters (e.g., Java, again...)...

Is Multiple Inheritance Evil?

Why is multiple inheritance considered to be evil while implementing multiple interfaces is not? Especially when once considers that interfaces are simply pure abstract classes? (More or less) duplicate of What is the exact problem with multiple inheritance?, Multiple Inheritance in C#, and some others... ...

How to know if the local Area Connection is available

Dear all i'm using Win XP and i want to know if the local area is available or not ?!? and if i'm using another OS would that affect on my code ??! thnx in advance ...

As a technical lead is it appropriate to reject a language based upon personal preference?

You could very well leave out "as a technical lead", but I think it puts the situation into context. I'm a technical lead, we're building a new app, and I have an idea of the language I would like the team to use. If one or more want to use a different language (out of personal preference), is it appropriate for me to reject it (out of p...

Atom Publishing Protocol in real life

I know that some big players have embraced it and are actually exposing some of their services in APP compliant way, already. However, I haven't found many other (smaller) players in this field. Do you know any web application/service that uses APP as its public API protocol? What is your own take on AtomPub? Do you have any practical ex...

Getting started with programmatic audio

I'm looking for resources, links, and so on to help get started working programmatically with audio. Specifically, the platform I'm working with exposes APIs to extract audio data from a resource (like an MP3), or to play back arbitrary data as audio. In both cases the actual data is byte arrays of 32bit floats representing 44.1 KHz ste...

How often do you need to create a real class hierarchy in your day to day programming?

I create business applications with heavy database use. Most of the programming work is just to connect components to the database and modifying components to adapt to general interface behaviour. I mostly use Delphi with its rich VCL library, and generally buy components needed. I keep most of the business logic in the database. I rarel...

Good resources on programming language design?

Javascript: The Good Parts is a great book. Often I find myself reading passages like the following from the perspective of a language designer: undefined and NaN are not constants. They are global variables, and you can change their values. This should not be possible, and yet it is. Don't do it. Takeaways: Don't change the valu...

Sending HTML emails that renders correctly in Notes 7

Does anyone here has any experience on how to send HTML emails that renders correctly on a Lotus Notes Client 7? My email has a couple of complex CSS files and I tried embedding them on <style> tags, but it doesn't seem to work. The thing is that the email renders perfectly in version 8 and on other email clients. Any hints or pointers...

Some (anti-)patterns on using assert (Java, and others)

Finally, I have a question to ask on Stack Overflow! :-) The main target is for Java but I believe it is mostly language agnostic: if you don't have native assert, you can always simulate it. I work for a company selling a suite of softwares written in Java. The code is old, dating back to Java 1.3 at least, and at some places, it show...

Quiz: When is a Comment Not A Comment?

Quick Quiz? What language has comments with side effects? In essence, comments which are not comments... ...

How to construct two objects, with each other as a parameter/member

I have two classes that each need an instance of each other to function. Ordinarily if an object needs another object to run, I like to pass it in the constructor. But I can't do that in this case, because one object has to be instantiated before the other, and so therefore the second object does not exist to be passed to the first obj...