Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
H

Henry miller

@Henry miller
About
Posts
490
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • prevent code stealing
    H Henry miller

    Contact your lawyers, and register your copyrights before they steal from you. Then after that fact sue them (not the employee who has no money, but the who buy the component), which allows you to collect tripple damanges. You end up making more if they steal your code than you can selling it yourself. Contact a lawyer though, because what I said only applies in narrow cases, you need a lawyer to tell you the specifics. In general I wouldn't worry about it. Most components are specific enough they have no use to anyone outside your company. When they are of use, there is normally a standard componant that is good enough, and if combined with the expirence of all the coders who are using them better.

    IT & Infrastructure csharp collaboration question

  • Unit tests
    H Henry miller

    Doesn't matter. I test and test and test. Then I scream we need a seperate test group. I still wake up in the middle of the night once in a while when I realize I forgot to test some obscure case. Or when a customer discovers one bug and I realize it has a more general case that is likely to hit others. It helps to have a seperate test group, but even when I was lucky enough to have a good one the above happened.

    C / C++ / MFC com tools question

  • Without formal education or ?
    H Henry miller

    Send them to this URL: http://www.catb.org/~esr/faqs/smart-questions.html

    The Lounge question help c++ com linux

  • File Access from CD-ROM
    H Henry miller

    Every time you ask for data on a CD that is not right after the last data you asked for the CD will need 1 second to position. So you need to figure out how you can read your table in order. Suggestion: Get Knuth's "The art of computer programing" out, and look for the sections on searching from tape.

    C / C++ / MFC css database help tutorial question

  • Why could a car battery be dying?
    H Henry miller

    I don't think the battery is dying. I can believe bad luck would involve to bad batteries, but not more than that. If this model car had a problem I think I would have heard of that. Therefore it is not the battery, so don't repalce the battery until you fix the problem. It could be a bad regulator, which could kill the battery, but that would just kill the next one. (in most but not all cases the regulator is part of the alternator) If not that, then start checking cables. A cable that doesn't have good contect (even though it looks good) can cause problems. One clue of this is the dome light is on bright when you open the car door, but you can't start the car. (though I find it unlikely that you could fix this with a new battery) My guess is the problem is in the charging area. Check the voltage when the car is off, then again when it is running. Check at the alternator (careful, there are moving parts and many places to ruin the alternator if you cause a short!) too.

    The Lounge question

  • IBM to release 500 patents to open-source use
    H Henry miller

    IBM has learned the hard way that if a patent can be worked around easily it will be. This has resulted in standards less than optimal that IBM then has to follow just because everyone else is doing it that way. So IBM often (but not always!) will nearly give away their most useful patents to make sure the best gets implimented. I suspect some are there in hopes that someone will want to use it internally to their company and license it (if reasonable). Others are there to encourage everyone to make the IBM thing a standard instead of lesser alternatives. And the last few are useless, but enough to get a nice number like 500 into a press release. In general it is advised the programers NOT look at these, so I won't be. If I come up with something in this list and use it at work, my company is in a much better situation legally if I know nothing about the patent! (If I know about the patent it costs my company more, though either way we will have to pay for past infringment and license the patent if we want to keep using it)

    The Lounge html com linux help question

  • Q: Selling my program.
    H Henry miller

    Either make it open source, or see a lawyer and an accountant. Seriously, you will need a lawyer to make sure the customer doesn't get any more rights than they pay for. Seems like you have rejected the former (nothing wrong with that), so you will want to make sure you are protected, particularly if they want to sell your software. Cost is always what the market will bare, and not what it costs you to make! Just because you have this paid for from the first contract doesn't mean that you should sell for $1, even though that would be profit. What did it cost you to write this software? If the first firm payed you $10,000.00, than you know it is worth $10,000 to someone, why won't all customers pay this. Further, the first firm didn't get rights, so they don't consider rights to the software worth $10,000 (or whatever they paid you. In short, you should charge this guy more because he wants the source code, and if he wants to sell it, you should charge more yet. Ethically the first customer paid for development, you should not give that away to their compitition for nothing without verbal permission from them. (Open source gives them the advantage that the next company that needs a new feature might give it back to them) Make sure the lawyer draws up a contract. Microsoft gives away Internet explorer because they bought the source code from Spyglass, and part of the agreement was spyglass would get some money from each sale, but because ie is free they get nothing! You want a lawyer better than yours so you can be protected from this. The fees should cover something like: Use of software in the company Use of software in company, plus source code that they can modify, but for internal use only. Use of software in company, plus source code that they can modify and sell to others. Often these are on a per user basis, not per company. It is fairly common in the first case for source code to be held by a third party escrow agency who will give your customers the source code should you go out of buisness, plus more rights to it. Make sure you charge enough to deal with overhead! You need to pay taxes on your buisness. You need to pay the lawyer and accountant. At least double the amount of money you want to take home as a start. You may need to hire and pay tech support, which mean you charge even more. Don't try to do this without a lawyer, there are too many things that we do not know. Some of it is specific from state to state. A lawyer can advise you about

    IT & Infrastructure csharp database mysql sql-server sysadmin

  • Burn CD "On the fly"
    H Henry miller

    I did something like this for backup software. First, if you have a choice use DVD+R or DVD+RW for this, because they have the best support for preventing "underrun". In fact if you are using CDs, to be legal you must be sure that your datastream is always big enough to write data when the drive is ready! (even if you are not!) I break this rule all the time on a modern drive, without too many problems, but if you sell this you need to require that your customers have a drive with good underun protection. Next, go to www.t10.org and buy the MMC standards. (you can download them too, but not the latest versions...) You might want to consider joining, depending on how technical your people are. t10 is the scsi standards orginization. Every CD writer that is faster than 4x is scsi! (it may be electrically IDE or USB, but it speaks the scsi standard, so that is what you care about). Read the standard several times until you think you understand it. Now, figure out how to send SCSI commands on your os. On Windows NT/2000/XP it is a device_ioctl SCSI_PASSTHROUGH_DIRECT (or something like that). Windows 95/98/me uses something else. Unix is something different again, different for each unix. Next you need to figure out what standard you will write data in. I don't know anything about the video CD standard, so I can't help you there. You can define your own format if you don't care about nothing else being able to read the disk. If you want to write a file, then you can either figure out UDF (I didn't, but this is perhaps the right way to go), or you can write ISO-9660. ISO-9660 is most easially found under the name ECMA-119. Get the spec, and learn that inside and out. There is just one detail you need to know: reserve a track at the begining of the disk, then write data to the next track, when done you write your directory to the reserved track. It took me about 4 months to write this myself (design through release). I had the advantage of a SCSI abstraction layer in place so I didn't need to worry about many of the details you will need to learn. Once you understand the standards and have a design the code is only a couple weeks, but it takes a while to figure out how to read all the standards. Good luck. If you have any more questions let me know, but not until you have studied all the documents I listed above!

    C / C++ / MFC json help question

  • extern "C" question.
    H Henry miller

    extern C++ is defined in the standard to mean do whatever the compilers default C++ is. since this is the default it is almost never used.

    C / C++ / MFC question c++

  • Notecard
    H Henry miller

    Re-think what you want on the card. My experience is professors who limit your notes do so because if you know the material you can easily fit everything in the much space using big letters. If you don't know everything, then you will fill the card with a lot of stuff that you shouldn't need. If you have done your homework, then you should have a good clue about what commonly comes up, and you have memorized a lot. Most of the time I never looked at my "cheat sheet" on the test.

    The Lounge tutorial question

  • const pointer
    H Henry miller

    Because prt_to_const is a promise that you won't modify the data through ptr_to_const, not that the data it points to cannot change by other means! One good reason to use const is to force other code to not change something. A class might return a ptr_to_const, that points to private internal class data. The class itself might modify the data via some function call latter, but it would be a mistake to let anything other than the class modify that internal data.

    C / C++ / MFC question c++

  • Help! in C++ How to implement 2 classes share one class
    H Henry miller

    Sounds like you might need a factory. class factory { factory(int num, a *A, b *B) { A =new a(num); B = new b(num, a,C); } }; class a { private: // THIS IS IMPORTANT! a(...) friend class factory class C; ... } class b { private: // AGAIN, IMPORTANT b(...) ... } Note that I skiped some details, that you will need to take care of, but this should give the idea. It occurs to me that you could do this differently with a static vector. I don't use the STL (I have to support a compiler that doesn't support modern C++), but something like this instead: class Cfactory { private: static STL::vector Cs; // I'm not sure about this syntax! The static is critical to this though static getSharedC(num) { c *C; if((C = Cs[num]) == NULL) { C = new c(num); Cs.add(num,C); } return C; } }; Again, I left out a lot of details, and I'm not even sure how the vector class works, but you should be able to make it work. The last has two major problems! The first is easy to work around, but the second could be a show-stopper. First, you need something to prevent memory leaks. Reference counting is easiest (that I know of, maybe a smart pointer would work?), something needs to make sure that c1 goes away only after both a1 and b1 is deleted. Second, this gives you global context for all c1. You can't have different two parts of the code creating their own a1, because even though the a1 class is different, those two instance share the same c1! You need to figure out how to deal with this. I can't think of anything that I'd really trust.

    C / C++ / MFC tutorial c++ help question

  • Memory leaks and VCRT
    H Henry miller

    That depends. Not all "leaks" are detected correctly, it has happened where a bound checker has found a leak that wasn't a problem. (I don't know about yours in particular, though. I'd start with the assumption that you should worry) There are two possibilities. First, MSVCRT71.dll might be programed incorrectly, and therefore there is nothing you can do other than upgrade to a newer version if one exists. Odds are strongly against this case, but it has happened, so if you get nowhere you might want to check into it. More likley is that you are using the library incorrectly. Read the documentaiton for all the functions you use. Look for the little line that says something like "allocates a foo resource which the caller must free when done by a call to freefoo()". Your bounds checker might give you a clue where to look first, but sometimes you just have to read the documentation for every function, and then check each time you use it.

    C / C++ / MFC performance help question

  • C++ or java?
    H Henry miller

    i am not sure if I should learn C++ or java Learn both. :) Seriously, a good programer can learn the syntax of both in very little time. Mastering either one can take 10 years, but there is an advantage of being able to say "I know C++ better, but this is a situation for Java so I'm using Java". Do not limit yourself, the basics or programing (data structres, algorithms, design patterns) carry over pretty well, even when the languages are very different. C++ and Java are not that different on the surface. Which is the better route Scheme. It is a language that is never used outside of accidemics, it is simple to learn, easy to program in. It is also nothing like C++, Java, Basic, or assemply. It is a whole different way of thinking, making some concepts easy that as a programer you are unlikly to discover in C++/Java. Is one language more useful Depends. You can't write a device driver in Java, but C++ isn't common for device drivers either. You can't write a portable web plugin in C++, while in theory Java allows this. You can't write a game that demands everything modern hardware can give in Java, but if you write a simpler game in Java is can work on both Windows and OSX. Is c++ being replaced by java? No. Nor is C# replacing either, except in very limited areas. Each has strengths and weaknesses. While you are at it, learn python, and at least one assemply language. Python is useful for some day to day programing that you don't want something as complex as Java/C++ for. Assembly is needed because you should always have in the back of your mind how the machine is really working. Once in a while this will save your from complex bugs. Scheme will teach you good habbits. Don't be afraid to learn new langauges.

    IT & Infrastructure c++ java question learning

  • Believe in yourself?
    H Henry miller

    I generally reply like that because I want to scare you. You are over your head when you ask some questions, and you have two choices. Giving an answer your your question is the wrong thing to do, because you need to learn to research this on your own (often for other useful information you will learn while finding the answer). Your first choice when this happens is to push on through, believe in yourself, and just solve it no matter how hard it is. It will take time and effort, but you become a better person for it. The other choice is to give up. This takes no effort, but it doesn't waste your time, nor does it waste our when when you hit the next road block (should we answer the question) that you can't solve. For most people this is the right thing to do, simply because they will give up eventially anyway. You are one of the rare people who fall into the first catagory. Now take a step back, would you have learned as much about the problem if we gave you all the answers? Could you even have solved it? My guess is you learned a lot along the way, much of which is important, but not something you would have thought to ask.

    C / C++ / MFC help question sysadmin lounge

  • device driver
    H Henry miller

    Get the device driver development kit for your OS. I'm assuming that have hardware specs. If you don't have hardware specs, you need to get them first. Good luck - most places where not give them away.

    C / C++ / MFC question

  • Problem while logon to FreeBSD
    H Henry miller

    FreeBSD is my main OS, but I don't use the live CD, so I can't directly answer questions. Try a different support area, most people on code project use windows. I'm not sure which is best though. Make sure you specify exactly what you are typing, the exact version of the CD you are using, where you got it from.

    System Admin help question csharp php linux

  • Knoppix can not find the exe file
    H Henry miller

    ./filename Or add the current directory to your PATH (the all caps is important). I'd tell you how, but I don't use knoppix but I'm pretty sure that it uses bash as the shell while I know and use csh. (the difference should come off as religious)

    System Admin question

  • Problem while logon to FreeBSD
    H Henry miller

    passwordless means no password at all that is type: root

    System Admin help question csharp php linux

  • Problem while logon to FreeBSD
    H Henry miller

    In the unix world we resopnd to this with RTFM - Read the fine manual. (depending on how stupid your question is other adjitives are often substituted for fine) In this case, if you read http://livecd.sourceforge.net/documentos.php you will see the following: If you did not customize user/group and passwords, the default root account is passwordles. Enjoy ;-) Note that the documentation is aweful at this point, feel free to contribute better documents. P.S. I word my question this way because unix is not idiot friendly. You will need to learn where to find answers to your questions. I found the answer in less than 5 minutes, you should be able to do the same.

    System Admin help question csharp php linux
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups