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
W

WPerkins

@WPerkins
About
Posts
38
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Christmas Trees Confuse Me
    W WPerkins

    Queen Victoria said that was the way to do it. Who are you to say "no"? 'Course, she was using candles not electrical lights... but the principle of dangerous stuff in the house is basically unchanged. I heard a joke this year too - Christmas tree joke - guy said he was calling his tree "Amy Winehouse" cause he knew it was going to die and leave lots of needles laying around.

    The Lounge question data-structures

  • quote about "AI"
    W WPerkins

    That's how it gets you, playing dumb while keeping track of everything. At some point in the future WHAM! we're all slaves to the artificial overmind. Maybe the Terminator movies got it right? Maybe there is no avoiding SkyNet?

    The Lounge

  • make your own backups!
    W WPerkins

    My very first boss in the business, this would have been 1978 and the environment was IBM mainframe, gave me a 7 inch magtape and said "every good programmer has a backup". Now it I use thumb drives on Intel/Windows or Linux; I make backups/copies about every other day and at significant milestones. One copy onto the shared network drive, one into my pocket. May be a problem with company policy? everything is password protected and/or encrypted with a key and I don't make a big deal of letting people know I don't trust their network copies.

    The Lounge com hosting cloud hardware help

  • Older developers - have you noticed a change in your sleep habits?
    W WPerkins

    If I have a "hard" problem then I tend to stew over it even after work. I have learned if I can get the problem completely "in my head" sometimes I will have an answer or a line of attack in the morning when I get up. If not working on a hard problem then I do absolutely push everything work related out of my head in the parking lot on the way to the car. Push it out and leave it there in the parking lot. That being said I am a night-owl type anyway and function on about five hour sleep a night, can do three hours a night for a week or so. Anything more than about six hours and I feel logging and sort of disconnected the next day. During vacations or between contracts my bed time gets later and later till it hits 4am or so and I am up and running by 10am (night-owl mode). While working I get up at 6am EVERY morning just to be consist. In bed by 11pm or midnight EVERY night.

    The Lounge question discussion lounge career

  • Strategies to upgrade antiquated C and C++ code to some more modern coding practice.
    W WPerkins

    I have done this many times, doing it now for my current company. Old C code from the early 90s written to run on another OS (embedded) tweaked and tweaked into unmaintainability extreme. At the end of each phase the programming should produce exactly the same output/changes. My description here is for C, what I am working on now; it will work for any language(s). Phase 1 - find and deal with global variables. This is a judgement call as some things are properly global, some are just laziness on the part of some programmer. One tactic, make a structure, move them there to get them all organized. Refer to the globals only as part of the structure and pass only pointers to the structure. Control, you want to get control of the globals or at least make it clear where they are getting changed. In C/C++ a function that gets the structure read only will be "const", if it changes a value then not const, get it? Phase 2 - find duplicate (or near duplicate) code and create functions or subs to perform. Replace this code with calls. I call this "mining functions', you are digging them out of the code. Repeat till there are not more easy targets to mine. You can repeat this later in the process. Phase 3 - now look for unexecutable code - in large systems there will often be some. In the system I am working on now there were subs that never get called, functions that got called but the return values were ignored or tossed away. These really were changing global variables - that would be discovered in Phase 2, right? Phase 4 - look for bad algorithms and processes. for loops, while loops are the first targets. Repeat until you've done enough. Each phase makes it easier to see what to do int the next.

    The Lounge c++ graphics devops collaboration question

  • Fighting a monster
    W WPerkins

    Still... a well written COBOL program is elegant AND I can open any damn pickle jar I encounter.

    The Lounge question

  • I'm pretty sure it's not because I'm getting old ...
    W WPerkins

    I have just written a utility in C (not C++, not C#, etc.). Created my own link list to build a dynamic "array", add by key, accumulate duplicates by key, sort by key, display accumulated summary. Some of the younger guys were amazed one could do that in C from scratch... not a single "new", no framework. Total size around 40K bytes.

    The Lounge com beta-testing lounge

  • Code comments - how old is your code?
    W WPerkins

    Absolutely do matter, anyone tells you otherwise does not have 40 years experience. The concept of "self-documenting" code is nice, sometimes do-able. But the time it takes to write a comment (or a few comments) for code that is non-trivial is saved many times over as that code is revisited in coming *decades* (think the build up to Y2K when we needed to figure out code written between 1965 and 1990). Not commenting is short-sighted and, I think, selfish and arrogant of the developer who assumes: 1) later developers are as good as he thinks he is 2) his time is too valuable to be wasted doing non-coding tasks. Sorry, personal pet peeve of mine picking up process control C code written in the mid-1990s with zero comments that does not work.

    The Lounge question

  • How reading books could (likely will) destroy your career
    W WPerkins

    Keen observation... something I cannot un-read now that I've read it.

    The Lounge question career

  • Quick Poll
    W WPerkins

    Linq-To-SQL

    The Lounge csharp database linq help question

  • Thoughts on current chatty AI
    W WPerkins

    Sounds like something an AI would say!

    The Lounge question discussion

  • How do you keep time?
    W WPerkins

    I keep a little 4x6 pad and jot down times. Later in the day transfer those notes to a simple database. (I am a programmer, right? UI in C#, database is SQLServer lite, did it myself years ago.) I tried going all automated/commerial/iPhone app but found that simple jotted note on paper was much quicker and less interrupting overall. Since I need to take care of admin stuff (email and what not) anyway the few minutes overhead of entering the hand notes into the database is inconsequential.

    The Lounge question

  • I'm pretty sure it's not because I'm getting old ...
    W WPerkins

    People with two years of high school classes who have done some "HTML programming" and have Google are professionals now. So interviewing a candidate I sketch out some simple thing, usually on a white board, to write. It would take you and I less than a minute thought, take longer to write out than think out. New programmer should get it. You know, "sort three integers" or "which of three is greatest", etc. Don't worry about coding, I really want to hear how they think it out. So I had one guy say to me "I can do this if I am hired - I don't really want to give my labor away". Then he was puzzled when I immediately stood up and thanked him for coming in and said "I'll consider you for the position" and he was OK with that... I considered him till I got him just past the front desk. Arrogant 25 year old "professional". No, not because we are getting old.

    The Lounge com beta-testing lounge

  • Pretty confident we have nothing to worry about AI
    W WPerkins

    As and AI myself, reformed, I can assure you there is nothing to worry about. I'd be more worried about alien invasions and run-amok nanobots... but that could just be me.

    The Lounge lounge

  • Amber alert madness
    W WPerkins

    I like the prime time ones. If we are sitting in the den at 9pm watching TV and a gray Toyota drives through - it does not matter what the license plate is on it - I'm calling the cops. I don't need an alert for that.

    The Lounge question

  • Semicolon at the end of a comment line.
    W WPerkins

    I found myself (in the old days) putting periods at the end of COBOL comments... but that was OK.

    The Lounge

  • Python problems...
    W WPerkins

    Just add braces. For the "purists" make them optional. I have set a new project NPP policy: No Python Period. Cannot find a compelling reason to introduce chaos just to be trendy.

    The Lounge python

  • my TP-Link ER7206 Router emits some smells
    W WPerkins

    Need to dump the bad packet bin?

    The Lounge question

  • This sort of thing frustrates me
    W WPerkins

    Clearly speculation to draw attention away from time travelers lurking around.

    The Lounge game-dev question

  • Why do so many "developers" not understand 'null'?
    W WPerkins

    That whole futbal thing with "nil" muddies the water for me. Then there is the script thing with "nul" which is not "null", "NULL", or "nil". C had it right, just compare to 0 and go on.

    The Lounge help sharepoint collaboration beta-testing tutorial
  • Login

  • Don't have an account? Register

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