Search:

Type: Posts; User: Cat

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Nope. Not even close, really, except insofar as...

    Nope. Not even close, really, except insofar as each was in part inspired by C or a C-styled language. Trying to learn C# by reading a book about Objective C would be like trying to learn Norwegian...
  2. You'll have the same kind of issue with the \w...

    You'll have the same kind of issue with the \w and the [0-9]*. Regex operators are greedy, so your \w+ is going to consume the number at the end of the string as well, and the [0-9]* will match zero...
  3. Replies
    52
    Views
    5,187

    I dunno, I disagree with quite a bit of this. ...

    I dunno, I disagree with quite a bit of this. Sure, there are some cool ideas there, but I think he's as guilty as anyone of doing exactly what he preaches against. Making this hypothetical editor...
  4. Replies
    52
    Views
    5,187

    I dunno. I use it extensively for web dev. On...

    I dunno. I use it extensively for web dev.

    On the plus side, I do like being able to make object and array literals. Prototype-based inheritance at first was a tricky paradigm to wrap my head...
  5. Well, the code needs a ton of work if you ever...

    Well, the code needs a ton of work if you ever wanted to use it for real, in fact you're basically need to re-design it from the ground up. I wouldn't ever use this if your plan was to expose this...
  6. In that case, pretty much the answer is no. The...

    In that case, pretty much the answer is no. The whole library looks to be designed around that being a singleton.

    I would question if you really needed more than one instance - there are good...
  7. Well for starters: 1. You should be sending a...

    Well for starters:

    1. You should be sending a MIME Content-Type header that is appropriate for the particular file being served, you can't send two Content-Type headers and expect it to work...
  8. Without changing the class? No - or at least not...

    Without changing the class? No - or at least not by any sensible means.

    With minimal changes? Unlikely. You're changing a fairly core design assumption, one that may likely have impacted many...
  9. Replies
    19
    Views
    1,253

    Oh, and as to being confusing: that really just...

    Oh, and as to being confusing: that really just indicates you don't intuitively understand the concept yet. It can be confusing at first to learn to think in object-oriented terms, but once you can,...
  10. Replies
    19
    Views
    1,253

    Necessary? No. Any piece of functionality could...

    Necessary? No. Any piece of functionality could be implemented with or without classes. Many languages don't have the concept at all, including one of the four I work with regularly.

    Do I use...
  11. Replies
    34
    Views
    3,225

    It's not really that unusual. Markup defines...

    It's not really that unusual. Markup defines content, and CSS describes presentation. A lot of web development is presentation, and CSS is a lot better than trying to use various HTML layout and...
  12. The most important thing is to be able to take a...

    The most important thing is to be able to take a list of requirements and know how to implement them. Knowing algorithms and data structures is good - you should at least be familiar with what they...
  13. What do you think that would gain for you? ...

    What do you think that would gain for you?

    There are a couple of good reasons to dynamically allocate data:
    1. Large data structures, because generally in practice you can allocate more space...
  14. Thread: Current Book?

    by Cat
    Replies
    4
    Views
    570

    Agreed with this. Everybody needs to write a...

    Agreed with this. Everybody needs to write a whole heaping lot of bad code in order to get to the point where they can write good code. Don't worry about learning every possible thing about a...
  15. Wow. That has to be the jankiest way I've ever...

    Wow. That has to be the jankiest way I've ever seen of embedding assembly (or rather, machine) language instructions. I am equal parts impressed and horrified :D
  16. Replies
    11
    Views
    834

    Well, pretty much every microcontroller could do...

    Well, pretty much every microcontroller could do this.

    Do you have a programmer for the PIC series? Those can be expensive relative to the cost of the microcontroller, but it's a one-time cost...
  17. Replies
    7
    Views
    577

    Well, some hints on how this could be a lot...

    Well, some hints on how this could be a lot cleaner and more concise without getting rid of what you are supposed to be learning:

    1. You've near-duplicated the same block of code ten times. ...
  18. You could do it in any language that can...

    You could do it in any language that can interpret its own code as a runtime script (C# could do this, for example, with the Roslyn compiler or CS-Script). Here, your main program would substitute...
  19. Thread: Why Code in C

    by Cat
    Replies
    5
    Views
    630

    That sounds like a non-programmer trying to...

    That sounds like a non-programmer trying to comment on programming. I guess it's better than writing a VB GUI to trace an IP address, or "programming" your satellites in HTML5.

    Frankly, the...
  20. Replies
    5
    Views
    933

    Define "doesn't work". Is your words[] array...

    Define "doesn't work".

    Is your words[] array populated with the right number of lines? Are any of them written to the output file? Do you get any exceptions?

    I see several possible problems -...
  21. To elaborate, it's because of order of...

    To elaborate, it's because of order of operations, and the fact that, when an expression has mixed integers and floating-point operands, the integers are promoted into floats to do the math.


    ...
  22. Replies
    6
    Views
    607

    Also, in this case, I'd use a lookup table and...

    Also, in this case, I'd use a lookup table and not a switch statement, it's a lot more compact and less prone to error (like forgetting a break or something). It also is more maintainable, in that...
  23. Replies
    11
    Views
    753

    I don't think that was what he was saying. He's...

    I don't think that was what he was saying. He's saying you approached this with an attitude of "I can't see a problem in my code, so there must be a bug somewhere else", while an experienced coder...
  24. Replies
    11
    Views
    753

    Never think "that can't be it" because it usually...

    Never think "that can't be it" because it usually is :)

    Anyhow, the two main ways I debug code:

    1. I read code and try to identify the problem. Start from what you know to be true and work...
  25. Replies
    11
    Views
    753

    Yes, it can be. In fact, you already...

    Yes, it can be.

    In fact, you already identified the problem - the last node in the list has a non-null forward pointer.

    Question: Where in your code are you setting that last node's forward...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4