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

Alan Balkany

@Alan Balkany
About
Posts
1.0k
Topics
46
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Why isn't C# more popular?
    A Alan Balkany

    I agree. C++ is a nightmare (and I've been programming in C++ years longer than C#). C++'s error messages are idiotic; sometimes they're only useful for identifying the line an error occurred on. For years, I assumed it had to be this way; spend hours pouring over "correct" code wondering why the compiler is complaining. Then my first substantial C# program compiled and linked almost the first time! No crazy "errors" about correct code! The error messages made sense! With C# you generally don't need third-party packages. A typical C++ project at work requires separate third-party packages (with all their quirks, complexity, and bad documentation) for: 1. The GUI 2. Processing XML 3. Encryption 4. Open SSL C# catches many memory errors. On a project I did the C# end and a team in Germany did the C++ end. I mentioned to one of them that C# catches memory errors, and got the arrogant reply "There are no memory errors in my code!". Fast forward a few weeks. Their end wasn't working: Memory errors. I took the opportunity to replace what they were doing, and their whole team (four of them) was taken off the project (and reassigned). I got a stock grant for saving the company money. I'd choose C# over C++ for almost anything.

    The Lounge question csharp c++ java regex

  • Implementation of the hash function in a HashMap
    A Alan Balkany

    The hash function should be identical for a hash table and a hash map; in both cases you go from a key to a table index.

    Algorithms question java oracle data-structures cryptography

  • When the arrogant know-it-all in your team is not you. - UPDATE
    A Alan Balkany

    First take his suggestions seriously; he may know some things you don't. If his suggestion is impractical, calmly explain to him why his suggestion won't be used. Problem solved.

    The Lounge question javascript html collaboration xml

  • Incomprehensible C++ error messages
    A Alan Balkany

    It's g++ 7.4.0 (Ubuntu 18.04). Compilers present an abstraction of the machine to the user. Making the user deal with implementation details is a violation of this abstraction. You'd never see anything like this in C#.

    The Weird and The Wonderful question c++ help

  • Incomprehensible C++ error messages
    A Alan Balkany

    Using these meta-categories violates the abstraction provided by the C++ language. It's lazy programming by the writers of the compiler. No other language (that I know of) does this.

    The Weird and The Wonderful question c++ help

  • Incomprehensible C++ error messages
    A Alan Balkany

    C++ error messages are often incomprehensibly surreal. I was baffled by an "Undefined reference to vtable" message until a tedious investigation revealed it was just a missing method from my class. Why the f doesn't the C++ compiler just say: "Method xxx is missing."?? This is just a sample; there are many more C++ error messages from simple causes complaining about parts of the compiler I've never even HEARD of. Out of curiosity, I emailed Bjarne Stroustrup and asked him why C++ error messages were so incomprehensible. Here is his reply: "Thank you for your inquiry. Goats are like mushrooms. If you shoot a duck, I'm scared of toasters." I guess that answers my question.

    The Weird and The Wonderful question c++ help

  • What are the programmers' opinions about Plain English Programming?
    A Alan Balkany

    It's been done. It's called COBOL.

    C / C++ / MFC com question discussion

  • What is the two-finger scroll event (MFC app)?
    A Alan Balkany

    I'm trying to adapt an MFC custom grid control to handle two-finger touchpad vertical scrolls. Looking through the Messages list in Class Wizard, I don't see anything that seems related to this. The control already has OnMouseWheel and OnVScroll handlers, and they work fine. There doesn't seem to be any documentation on this. Can someone tell me the secret two-finger-scroll event, or point me in the right direction? Thanks! Alan

    C / C++ / MFC question c++ css

  • Binary tree
    A Alan Balkany

    Just recursively trace down the left branches in the right sub tree. The left element is always lowest.

    Algorithms data-structures

  • Algorithm for Tournament tree
    A Alan Balkany

    I've just received an email from codeproject telling me my post (above) has been marked as potentially being spam. WTF??

    Algorithms sharepoint com algorithms data-structures collaboration

  • Algorithm for Tournament tree
    A Alan Balkany

    It's not clear what you want. You mention "all the possible combinations", but your link is to an elimination tournament, which is different.

    Algorithms sharepoint com algorithms data-structures collaboration

  • which mathematical subjects I need to know for learning algorithms
    A Alan Balkany

    Algebra is the most important, since everything is based on it. Graph theory helps develop the kind of reasoning you need for algorithms. I've found linear algebra useful for real-world algorithms I've had to implement, but it depends on the domain you're working in.

    Algorithms learning help question

  • Compression algorithms
    A Alan Balkany

    Run-length encoding is a very simple one. It will save you some work by substituting it for one of the complex ones you mentioned.

    Algorithms question

  • VB6: Resource Editor shows no resources [SOLVED]
    A Alan Balkany

    It turns out the geniuses who created this project made their own resource file with their own custom format! Arrgh...the joys of legacy code!

    Visual Basic tutorial question learning

  • VB6: Resource Editor shows no resources [SOLVED]
    A Alan Balkany

    I've inherited a VB6 project that uses resources, and they work fine, but when I open the resource file with the resource editor, there are no resources there! Googling hasn't turned up any similar problems. Anyone have an idea how to get access to the project's resources? Thanks!

    Visual Basic tutorial question learning

  • How to perform Expression Evaluation
    A Alan Balkany

    The "official" way to do expression evaluation involves parse trees and reverse Polish notation, but I found a simpler more practical approach: Repeatedly process your list of tokens, making it one step simpler each time by applying a series of rules: 1. If you see the sequence '(', 'number', ')', replace it with just 'number'. 2. For each operator in decreasing precedence, look for the sequence 'number', 'operator', 'number' and replace it with the result of the operation. If you end up with a single number, that's your answer. Anything else indicates a syntax error in the input expression.

    C / C++ / MFC tutorial data-structures

  • Boundless Binary Search
    A Alan Balkany

    This approach has been done before, e.g. the implementation of qsort in the C runtime library transitions from quicksort to a (linear) insertion sort when the partition size gets below a certain threshold.

    Algorithms com data-structures question

  • GA/GEP Mutation Rates
    A Alan Balkany

    IMHO the type of mutation doesn't matter that much. Its purpose is to "jump" to nearby areas in the problem space. Any variation will accomplish that. The best mutation rate can't be stated as a hard and fast rule, as in that book; it will depend on the specific problem you're trying to solve. (BTW, there's no "singularity" at the center of a black hole; the "infinite density" is an artifact of using continuous equations to describe a discrete system. The physicists have mistaken their equations for the reality they're trying to model.)

    Algorithms question tutorial lounge learning

  • Algorithm/Pseudo code help for swapping/comparing values
    A Alan Balkany

    Here's a piece of the solution:

    void SwapValues (ref int a, ref int b)
    {
    int temp = a;
    a = b;
    b = temp;
    }

    Now you have to write the "if" statements to determine the calls to SwapValues to get your variables in numeric order.

    Algorithms help algorithms question

  • David Cameron wants to ban encryption
    A Alan Balkany

    David Cameron is ultra-focused on his desire for the government to be able to read your emails. This impractical enemy of democracy and privacy needs to be removed from any position of responsibility.

    The Lounge csharp html security question
  • Login

  • Don't have an account? Register

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