Search found 820 matches

by 0xBADFEED
Thu Nov 05, 2009 3:16 pm UTC
Forum: Religious Wars
Topic: Java vs C/C++
Replies: 88
Views: 22680

Re: Java vs C/C++

... 3. Open source projects, overwhelmingly target Linux either by itself or as part of a collection of targets. Given the the nature of group linux think** (TM) no doubt many projects were written in C/C++ because Java programmers are "mediocre". It has little to do with any kind of &quo...
by 0xBADFEED
Wed Nov 04, 2009 12:35 am UTC
Forum: Religious Wars
Topic: Java vs C/C++
Replies: 88
Views: 22680

Re: Java vs C/C++

C++ has been basically obsolete for application development ever since... Not even close to true. C++ continues to be an extremely popular choice for application development. Maybe not for your run-of-the-mill CRUD or web applications, but it's still very popular. Primarily because it has a lot of ...
by 0xBADFEED
Tue Nov 03, 2009 2:34 pm UTC
Forum: Coding
Topic: C++ conditional casting
Replies: 13
Views: 1568

Re: C++ conditional casting

You should use 'code' tags when posting code. It's hard to read otherwise. This does not do what you want. void* data; if( type == HNUMRC ) { float* data = static_cast<float*>(valary); } You're declaring a new variable 'data' of type float* that momentarily shadows the outer 'data' variable, and the...
by 0xBADFEED
Fri Oct 30, 2009 2:36 pm UTC
Forum: Religious Wars
Topic: Java vs C/C++
Replies: 88
Views: 22680

Re: Java vs C/C++

I'm not a big fan of Java as a language. One thing that is really nice about Java though is that I can sort of turn my brain off and still write half-decent Java. You can write Java on auto-pilot when you're burned-out or tired and it will still be OK. You can't do this with C, and definitely not wi...
by 0xBADFEED
Fri Oct 30, 2009 2:29 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999432

Re: Coding: Fleeting Thoughts

I often get a feeling that something is not right with my current approach, and then I stop making progress because I don't want to do things the wrong way. Which means I rarely finish my free time projects. You should stop doing this and just push through. Don't worry about doing things the "...
by 0xBADFEED
Thu Oct 29, 2009 2:46 pm UTC
Forum: Religious Wars
Topic: Is MVC Actually Appropriate for the Web?
Replies: 23
Views: 10025

Re: Is MVC Actually Appropriate for the Web?

Personally, I'm not a huge fan of strict MVC. I much prefer when the View/Controller are integrated into a single component. It provides data/presentation separation but is a lot lighter-weight and more manageable than strict MVC. This is how most UI toolkits are actually organized, and is where mos...
by 0xBADFEED
Thu Oct 29, 2009 1:42 pm UTC
Forum: Coding
Topic: What to learn: Perl, Python or Ruby?
Replies: 41
Views: 4856

Re: What to learn: Perl, Python or Ruby?

As far as I know "strongly typed" refers to specifying what type variables are, e.g. int i; Klass k; which then automatically disallows using them as parameters to functions and methods whose parameter is specified to be of another type, as well as disallowing k.method() if method is not ...
by 0xBADFEED
Wed Oct 28, 2009 8:39 pm UTC
Forum: Coding
Topic: What to learn: Perl, Python or Ruby?
Replies: 41
Views: 4856

Re: What to learn: Perl, Python or Ruby?

Monika wrote:All three are similar to PHP in that they are weakly typed, interpreted languages (scripting languages).

Ruby and Python are both strongly (dynamically) typed languages.
by 0xBADFEED
Wed Oct 28, 2009 1:19 pm UTC
Forum: Computer Science
Topic: Inversion of innovation in CS
Replies: 26
Views: 4681

Re: Inversion of innovation in CS

Actually Joel writes some pretty good, relevant articles. Have you actually read his stuff, or are you just trying to sound like a tosspot for the sake of it? I've read a lot of his stuff. For me it's pretty hit or miss. He's written some good articles in the past, but he strikes me as kind of a tw...
by 0xBADFEED
Wed Oct 28, 2009 12:11 am UTC
Forum: Religious Wars
Topic: Is MVC Actually Appropriate for the Web?
Replies: 23
Views: 10025

Re: Is MVC Actually Appropriate for the Web?

Everything in web dev just feels so...dirty and poorly thought out. I think that's mainly because it wasn't really thought out. It's very much something that has evolved. I think a more pertinent question is whether the traditional browser is really suitable for the direction the web is heading. I ...
by 0xBADFEED
Tue Oct 27, 2009 11:25 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

I meant that it would be pretty annoying if the default behaviour of comprehensions was to always return iterators rather than lists. I don't know, I actually prefer the newer versions. If you have a filter/map/fold pipeline there are a lot of reasons why an iterator is preferable. The main problem...
by 0xBADFEED
Tue Oct 27, 2009 11:07 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

poohat wrote:Why dont list comprehensions return iterators?

You can use a generator expression, e.g.

Code: Select all

(g(x) for x in f() if x)  #returns an iterable sequence

to create a lazy sequence rather than a full-fledged list.
by 0xBADFEED
Tue Oct 27, 2009 10:15 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

No, Guido pretty much hates functional python. Yes, I've read him say a number of times that he doesn't think Python is particularly suited for functional programming and that it wasn't designed with that in mind. I've never read anything about him hating fp as a technique (fp in a larger sense her...
by 0xBADFEED
Tue Oct 27, 2009 8:27 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

python would be better if the creators didnt hate functional programming. I don't really think it's a hate thing. It's just that Python is first and foremost an imperative language so it pushes the imperative concepts heavily. I do agree though, a nicer lambda syntax and more powerful lambdas would...
by 0xBADFEED
Tue Oct 27, 2009 8:19 pm UTC
Forum: Coding
Topic: Help a beginner: Problem in C
Replies: 10
Views: 1147

Re: Help a beginner: Problem in C

SkinnyPapa wrote:I've attached my code

I don't see it. Just copy it into some 'code' tags.
by 0xBADFEED
Sun Oct 25, 2009 2:27 pm UTC
Forum: Computer Science
Topic: How do computers work?
Replies: 33
Views: 5656

Re: How do computers work?

Does your department offer some introductory hardware/computer architecture classes? They're required for completion of most CS degrees I've ever heard of. They'll teach you about all of this and in much greater detail than anyone could manage on a forum. If on the off chance that your department do...
by 0xBADFEED
Sat Oct 24, 2009 5:45 pm UTC
Forum: Coding
Topic: [C++] help with Hashtable debugging
Replies: 11
Views: 1140

Re: [C++] help with Hashtable debugging

This method of defining the hashing traits of a type is unidiomatic and subtly restrictive. #define HASH(type) \ template <class T> \ unsigned int Hash(const type<T> &obj) { \ unsigned int *dat = new unsigned int[obj.length()], *ptr = dat; \ typedef typename type<T>::const_iterator const_iter; \...
by 0xBADFEED
Fri Oct 23, 2009 11:39 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

I take it that once you've got everything into __main__ that you can just "Run" the .py script, and it runs much like running a java bytecode? (IE: > python script.py is much the same as > java myprogram ?) Yeah you can just: $> python myscript.py To run it from the shell. You don't even ...
by 0xBADFEED
Fri Oct 23, 2009 10:09 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999432

Re: Coding: Fleeting Thoughts

Wow, this thread got busy. I was a bit vague when wording my other post, so I will clarify. He was using dfs to implement the filling algorithm in MS Paint, and at the end of the lecture, he said "this is also how modern games do pathfinding", rather pointedly at me (because I do coding o...
by 0xBADFEED
Fri Oct 23, 2009 8:01 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999432

Re: Coding: Fleeting Thoughts

Isn't DFS unbounded for pathfinding? (i.e. keep walking in circles) Or are you also marking each space to make sure you don't visit it twice? Any correct DFS implementation will only visit a node once. It will not get caught in cycles. Two responses: 1. BFS is a better pathfinder than DFS anyway, i...
by 0xBADFEED
Fri Oct 23, 2009 3:07 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 1999432

Re: Coding: Fleeting Thoughts

Either way, man, bad move on the prof's part. People *remember* these things. Someday someone's going to try and implement pathfinding with dfs because of some tickle in their brain, and it will be this prof's fault. There's never an excuse to use bad examples in algorithms. I don't know. I think t...
by 0xBADFEED
Fri Oct 23, 2009 3:01 pm UTC
Forum: Coding
Topic: awt/swing question
Replies: 1
Views: 264

Re: awt/swing question

I'm not sure why you want to do this it's very much against most UI idioms. But anyway... the quickest (and easiest) thing I can think of is to override the painting method of the button. When the button is disabled it simply doesn't paint itself (instead of painting its disabled state). It will sti...
by 0xBADFEED
Fri Oct 23, 2009 2:49 pm UTC
Forum: Computer Science
Topic: Inversion of innovation in CS
Replies: 26
Views: 4681

Re: Inversion of innovation in CS

ThomasS wrote:Over time a larger and larger fraction of "visible" innovation with regards to computers becomes the result of computer engineering....

"Computer Engineering" typically means hardware or embedded system design. I think you probably mean software engineering.
by 0xBADFEED
Fri Oct 23, 2009 2:40 pm UTC
Forum: Computer Science
Topic: Inversion of innovation in CS
Replies: 26
Views: 4681

Re: Inversion of innovation in CS

First off, "hobbyists" is an incredibly poor term for describing that particular group of people. They tend to be professional software developers or academics doing exploratory work in their off-time. This is vastly different from the common meaning of "hobbyist", someone who is...
by 0xBADFEED
Fri Oct 23, 2009 1:06 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

When writing in python... is it normally a process of: Write functions in a script file Set up variables in the interactive window load the script file call functions from the interactive window? Yes. It's very normal, and good, to write functions in a script file and then use the interactive inter...
by 0xBADFEED
Tue Oct 20, 2009 12:37 am UTC
Forum: Coding
Topic: Woo closures in C!
Replies: 24
Views: 2535

Re: Woo closures in C!

How does multiple dispatch lead to OO? just curious... I don't see it as much of an OO feature. Its nice, but it doesn't add as much to an OO based system as I think it would to a functional based system. "Leading to OO" is probably a bad way to phrase it. It's more like it alleviates som...
by 0xBADFEED
Mon Oct 19, 2009 2:23 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

...snip... No, I won't "guess" which scope ended, thanks. I'll just tell my IDE to fold the code as necessary because that is what IDEs are for. yeah, human-readable languages are so overrated. also, try running your IDE on a machine with a 400 MHz processor and 256 MB of RAM. To be fair,...
by 0xBADFEED
Sat Oct 17, 2009 10:51 pm UTC
Forum: Coding
Topic: i hate asking, but have been fighting python too long
Replies: 2
Views: 605

Re: i hate asking, but have been fighting python too long

You're doing this:

Code: Select all

button = getGamepad("button")  #returns list
button["button"] #trying to index list with string
by 0xBADFEED
Sat Oct 17, 2009 2:01 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

the fact that two lines of code that look identical don't do the same thing is a feature? sure, you can do similar things with unicode characters in some languages, but python lets you do it with just ascii characters. To be clear, I was saying that many Python programmers think that the fact that ...
by 0xBADFEED
Sat Oct 17, 2009 12:23 am UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

I'm not going to debate the point because I don't really care either way. But many Python programmers would call this a feature.
by 0xBADFEED
Fri Oct 16, 2009 11:40 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

You, sir, name? wrote:It's actually

Code: Select all

(tab)x = 0
(spacespacespacespace)x = 0

But the friendly forum translates the tab into spaces for some obscure reason.

Ah, OK. Although, mixing tabs and spaces for indentation is a bad idea in any language.
by 0xBADFEED
Fri Oct 16, 2009 11:23 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

Uh... I knew strings were immutable... is a similar thing in play here? I got all the other ones... I can't think what he's referring to. Maybe indentation that the forum dropped; maybe an ambient "global x" in one line but not the other; maybe a mistaken dig at operator overloading (= ca...
by 0xBADFEED
Fri Oct 16, 2009 1:02 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

Is there a different IDE or setup process that you guys can recommend? I think Emacs is the best Python environment. Although, I also think PyScripter is a nice lightweight environment for fast scripts and for more heavyweight projects there's always the PyDev Eclipse plugin. IDLE (comes with Windo...
by 0xBADFEED
Fri Oct 16, 2009 12:26 am UTC
Forum: Coding
Topic: First time language:
Replies: 11
Views: 1699

Re: First time language:

The things I loved about VB were a click and drag interface builder and a place to leverage my epic QBASIC skills, does python offer this stuff? There are a number of UI toolkits that have click-and-drag UI builders (GTK and Qt come to mind) that have Python integration. WxWidgets may have one but ...
by 0xBADFEED
Thu Oct 15, 2009 5:06 pm UTC
Forum: Coding
Topic: BF Logic Question
Replies: 5
Views: 694

Re: BF Logic Question

Can you clarify what you mean by "logic"?
by 0xBADFEED
Thu Oct 15, 2009 2:53 pm UTC
Forum: Religious Wars
Topic: The Turing Machine vs. Lambda Calculus
Replies: 32
Views: 21405

Re: The Turing Machine vs. Lambda Calculus

There's lots of research still going on in Lambda Calculus. Especially when it comes to types, LC is pretty much the go-to petri dish. ... It's not what I'd call useless. Turing machines on the other hand... Oh I'm not debating whether LC is more useful (in most ways) than the Turing Machine, it is...
by 0xBADFEED
Thu Oct 15, 2009 2:31 pm UTC
Forum: Religious Wars
Topic: The Turing Machine vs. Lambda Calculus
Replies: 32
Views: 21405

Re: The Turing Machine vs. Lambda Calculus

Lots of people seem to be talking about the relative usefulness of Lambda Calculus compared to the Turing Machine. In a matter such as this I think usefulness is highly overrated.
by 0xBADFEED
Thu Oct 15, 2009 2:16 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

0xBADFEED: I've used Python on small scales for uni subjects. I understand it well enough to program in it, but I suspect that from the materials and projects we did that we never used runtime manipulation, metaprogramming or anything that made Dynamic Scripting 'useful'. Hence, I've used the langu...
by 0xBADFEED
Wed Oct 14, 2009 2:42 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

Is there anything that would be lost by having 'self' as an implicit parameter for methods instead of having to include it each time? I understand why it's there, but it still trips me up why I have to write it each time. You can get rid of it by using a selfless metaclass that applies a decorator ...
by 0xBADFEED
Wed Oct 14, 2009 1:05 pm UTC
Forum: Religious Wars
Topic: Am I the only one on here that can't stand Python?
Replies: 184
Views: 35861

Re: Am I the only one on here that can't stand Python?

It would increase my productivity in areas that of no use to me. I have no need to set up prototypes of application logic and algorithms. Yes you do. You just don't know it yet because you haven't done it. I don't see the wonder of dynamic scripting that everyone preaches here. Well, since by your ...

Go to advanced search