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
A

azonenberg

@azonenberg
About
Posts
44
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • The day you realized you were a programmer ...
    A azonenberg

    Wow - you were pretty fast. My dad got me started in C when I was 9, but I wasn't too into coding until just before I turned 11, when I got started in C++. I can't say when I first realized I was a programmer, but I do know that a few years ago I suddenly discovered that I was a crypto geek. I was sitting down with my laptop, writing an AES implementation for my TI-89, when it hit me: Instead of playing on my Xbox like many of my friends were, I was playing with S-boxes!

    The Lounge csharp help

  • iPod or Zune
    A azonenberg

    I use my phone for the rare occasions when I listen to music away from my computer or a stereo. A 2GB microSD card is enough capacity for me - I can fit nearly half of my 5GB music library on it. Regarding software, I just stick the card in a reader (using a micro-to-standard SD adapter) and copy files onto it with Windows Explorer.

    The Lounge c++ com architecture question

  • First programming language for high school students?
    A azonenberg

    I do a lot of performance-critical stuff (image processing, gaming, simulation) and write x86 assembly at least every other week. Although assembly is difficult compared to C++, I actually find asm programming to be a bit more "fun" than C++... when taking in small doses :)

    The Lounge c++ question

  • First programming language for high school students?
    A azonenberg

    I rarely write raw assembly code. I usually make an entire app / subsystem / function in C++, and then do profiling to see where most of the time is being spent. I then "hand compile" the speed-critical areas to assembler and optimize them. I've been coding in C++ since age ten, so I practically think in it. IMO design is far easier in C++ than assembly because you can focus on WHAT you're doing more than HOW.

    The Lounge c++ question

  • First programming language for high school students?
    A azonenberg

    Personally, I started learning C++ in my spare time when I was ten years old. By the time I was 11 or 12, I was writing MFC GUI apps and was studying PHP and HTML. Around 16 I began learning x86 assembly. Admittedly this is a bit of an extreme case - among computer science majors at my college I've only found one or two that have been coding as long as I have - but I still recommend C++.

    The Lounge c++ question

  • TPM Sucks
    A azonenberg

    I use an in-house app called AESPad for all of my sensitive documents - a clone of WordPad with automatic 256-bit AES encryption. Keys are stored on a hardware token that's on me nearly 24/7, and as a second authentication factor, the key is hashed with a password before use. Cracking a system like that is pretty much impossible if you steal the laptop, because I'm not around to give you the password at that point. The only realistic options are: * get a spyware app onto the laptop to steal the key from RAM after I've unlocked the hardware device, or * steal the hardware token and somehow figure out the password. I'm experimenting with ways to make the first option impractical by performing on-chip crypto rather than doing it on the CPU.

    The Lounge csharp com question

  • C# or Java ??
    A azonenberg

    I'm sure he doesn't mean write EVERYTHING in assembly. I write almost all of my code in native C++, and for really speed-critical stuff I use asm optimizations. An RF raytracer I wrote last week experienced a perceptible speed improvement just by changing a few sqrt calls to assembly. Consider the statement dist=sqrt(dsq); The code generated by this is nearly 60 instructions long: (simplified for display)

    fld dsq
    call sqrt
    fstp dist

    ;Everything below this is in msvcrt.dll
    sqrt:
    ; save stack frame and registers - about 8 instructions
    call _sqrtf
    ; restore stack frame and registers - about 8 instructions
    ret

    _sqrtf:
    ; save stack frame and registers - about 8 instructions
    call _sqrt
    ; restore stack frame and registers - about 8 instructions
    ret

    _sqrt:
    ; save stack frame and registers - about 8 instructions
    fsqrt
    ; restore stack frame and registers - about 8 instructions
    ret

    The same exact result can be obtained by using three inline assembly instructions:

    fld dsq
    fsqrt
    fstp dist

    This is TWENTY TIMES LESS CODE than the high-level version! This is admittedly an extreme example, but it was taken directly from code I wrote last week, in an inner loop executing about 5x10^7 times per update.

    modified on Tuesday, May 20, 2008 2:35 PM

    The Lounge csharp java question

  • C# or Java ??
    A azonenberg

    Well, for REALLY intense image processing you will want to use assembly language. One time I wrote a raytracer for calculating the signal strength of an 802.11 network. In C++ it took around 700ms to refresh the screen with one access point. (1000x800 pixel map, 2.2 GHz dual core cpu, single-threaded renderer). Making the renderer threaded dropped the render time to around 500ms - but rewriting the inner loop in assembly language (only 19 instructions) doubled the speed to 250 ms.

    The Lounge csharp java question

  • No one teaches PROGRAMMING any more
    A azonenberg

    You should know assembler coming OUT of college? I'm 17 and will be a college freshman (CS major, obviously) this fall. I wrote the code snippet below off the top of my head, using no references but an ASCII table (to look up the value of '0'. It doesn't do anything complicated - just outputs the numbers 0 to 9 inclusive - but it proves my point.main: xor eax, eax ; initialize loop loop: mov ebx, eax ; convert to ascii for output add ebx, 30h push ebx ; print it call putc add esp, 4 ; unwind the stack inc eax ; bump loop counter cmp eax, 9 ; time to stop? jle loop ; no, keep going done: ret putc: ; implementation not shown - print character at top of stack to screen ; using __cdecl calling convention

    modified on Tuesday, May 13, 2008 7:28 PM

    The Lounge

  • No one teaches PROGRAMMING any more
    A azonenberg

    Well I guess I'm in the minority then. I'm 17 years old and will be entering a CS program at a major university this fall. I wrote my first C program in 1999 and was learning C++ before my tenth birthday. I've written a bytecode compiler and interpreter for an object-oriented language based on C++. I not only wrote a complete Windows GUI application (albeit a simple one) in x86 assembly, I actually enjoyed doing it. I've never had a formal course in operating systems, but that will be coming soon...

    The Lounge

  • No one teaches PROGRAMMING any more
    A azonenberg

    There's a difference between a b-tree and a binary tree. Look 'em up: B-tree (Not to be confused with Binary Tree)

    The Lounge

  • Windows XP Professional uptime
    A azonenberg

    The longest my Vista (32-bit) Ultimate laptop has gone was about 72 hours - then Patch Tuesday hit and I had to reboot. (I've had some problems with it, but they were mostly with non-MS apps like McAfee virus scanner. After one infinite loop too many, I killed it and got AVG instead.)

    The Lounge com

  • The worst code i've ever seen....
    A azonenberg

    And in 45 seconds I can prove to you that native C++ with ASM optimizations will run rings around them both.

    The Weird and The Wonderful java com tools performance

  • The worst code i've ever seen....
    A azonenberg

    FocusedWolf wrote:

    At NJIT they teach java now.

    Which is why, having been accepted to both, I plan to go to Rensselaer Polytechnic. I've been using C++ since I was ten years old and I don't want to give it up for four years!

    The Weird and The Wonderful java com tools performance

  • Curse the .NET designers
    A azonenberg

    I do all of my client development in C++ and write my servers in C++ or PHP. I've never had a serious performance issue with any of my apps once I finished them.

    The Lounge csharp c++

  • Programming detective work
    A azonenberg

    He's looking to know whether it was a standard or professional edition compiler IIRC - not 6 vs 7 or 8.

    The Lounge question

  • More Than Urgent [modified]
    A azonenberg

    <blink> tags, anyone?

    The Lounge question

  • Outlook 2007 and Vista - a cautionary tale
    A azonenberg

    I bought my Dell Inspiron (Vista Home Premium) in August. It performed fine except for one little glitch in network file transfers, and the external monitor port sometimes didn't work. SP1 (final release) fixed all that. I'm officially happy with Vista.

    The Lounge sysadmin question com help career

  • Programming detective work
    A azonenberg

    Referenced assemblies? In VC6? This app is all native code.

    The Lounge question

  • Why I still use vc6
    A azonenberg

    Not really. It worked fine in VC8 - and I declared it one line before the loop.

    The Lounge performance com algorithms
  • Login

  • Don't have an account? Register

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