|
Actually the result is correct; in C# ^ is the XOR operator, what you should've used it Math.Pow. Also just to explan 33 is 100001 in binary, which XOR'ed with 000010 results in 100011 = 35.
|
|
|
|
|
Just goes to show that I'm so at home using '^' for power has let me down here........my bad.
I've taken myself outside and given me a good talking to.
Have a +5 for highlighting my stupidity.
|
|
|
|
|
|
: java : FTFY
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Entertainment != learning.
It's a sick and undereducated mind that tries and make everything "fun". There's brass where there is muck.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I'm sorry to disagree, but there have been centuries now of educational toys. They fulfil a good purpose.
I'd hate to be one of your children - oi you, stop enjoying learning!
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Rob Grainger wrote: I'm sorry to disagree, but there have been centuries now of educational toys. They fulfil a good purpose. Yes, for kids.
Then again, once you even start to grow up you move to a more efficient way of learning - you're schooled. Playing games is based on the simplest form of learning - the monkey see is monkey do principle. Once you can read, it is more efficient to pick up a book.
Rob Grainger wrote: I'd hate to be one of your children
You would.
Rob Grainger wrote: oi you, stop enjoying learning!
You're jumping to a conclusion here; I'm not opposed to fun during learning. I'm opposed to marketing selling a lot of crap and acting like everything in the world should be fun. We don't live in a TV-commercial, some realism might be very beneficial.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
There have been a lot of toys and games popping up that secretly teach kids programming basics and how to code, but why is it so important to teach programming skills to our kids? Bah, in my day we just had a deck of punch cards and an awl
|
|
|
|
|
Admit it, you're bored.
Jeremy Falcon
|
|
|
|
|
OK, I admit it.
There's just *nothing* going on. It's like the press is waiting for Apple to release a new product or something. I miss the days when we had a new web framework every three days.
Ima go in the corner and sulk now.
TTFN - Kent
|
|
|
|
|
Have a look at developer blogs at big companies, they are sometimes pretty interesting and worth a read especially Microsoft ones.
.-.
|o,o|
,| _\=/_ .-""-.
||/_/_\_\ /[] _ _\
|_/|(_)|\\ _|_o_LII|_
\._. |\_/|"` |_| ==== |_|
|_|_| ||" || ||
|-|-| ||LI o ||
|_|_| ||'----'||
/_/ \_\ /__| |__\
|
|
|
|
|
Trust me: I monitor a lot of them.
Windows blog - nothing since April 2
Building Apps for Windows - May 1
Exploring IE - April 25
Microsoft Developer blogs - nothing useful since 1st day of TechEd (Monday! Yeesh)
.NET Blog - light this week
Hanselman - I haven't posted anything from him for almost two whole days!
It's enough to almost make me want to see if there are Oracle or IBM blogs.
Almost.
But then I'd have to install a shower in the cubicle.
TTFN - Kent
|
|
|
|
|
Our Agile Architect commits heresy by suggesting that developers are writing too many tests. Perhaps the question should not be, "Do I have a test?" It should be, "Do I have the right test?" Will this be on the exam?
|
|
|
|
|
I did a pair programming "interview" last weekend where the code (Ruby on Rails) had four kinds of tests:
unit tests for functions
model tests for, you guessed it, Models
Jasmine tests for the client-side Javascript
Capyabara tests for the integration testing
It seemed like in inordinate amount of testing.
The really laughable part though was when we stumbled across some code like this:
LogTransaction(old_value, new_value)
Followed by the definition:
def LogTransaction(new_value, old_value)
The irony being, that the definition was mislabeled. "new_value" was actually the old value.
No amount of testing could find that, except to say of course that the code did the right thing, but semantically, it was incorrect.
Marc
|
|
|
|
|
That website was not tested. Firefox shows an XML error: no element found...
Too many tests? The right test? Ehm.
|
|
|
|
|
Which companies stand with their users, embracing transparency around government data requests? Which companies have resisted improper government demands by fighting for user privacy in the courts and on Capitol Hill? "Be thankful we're not getting all the government we're paying for."
|
|
|
|
|
Facebook came to the conclusion that MVC does not scale up for their needs and has decided to use a different pattern instead: Flux. Because MVC is sooooo 1980s
|
|
|
|
|
Facebook's consistency requirements and data are pretty atypical cases I'd imagine. Also having an almost unlimited pot of fairy dubloons means they couldn't care less about developer productivity.
All that said - quite an interesting article. The pity is that it will be used by those who know little as ammunition to reduce all formal process to "copy blocks from google and give it a try".
|
|
|
|
|
The view should never have direct access to the model. That's one of the things MVVM addresses. I like the simplified design of Flux they're talking about, but I'd still add a client-side VM layer on top of it for the extra layer of abstraction. Maybe something like FluxVM or FVM. Sounds nice.
Jeremy Falcon
|
|
|
|
|
Wait.... so they invented the Windows Message Queue.... but in a web server?
Old stuff == New stuff.
|
|
|
|
|
The irony of that is sweet. I recently co-wrote a kiosk application. It never really looked MVC. We had a "Metastore" (heh, notice the similarity in names) that contained all the data, and our dispatcher was a very cool state manager that I wrote. The views were WPF.
Now I have a name for that kind of architecture. Flux!
Marc
|
|
|
|
|
Marc Clifton wrote: and our dispatcher was a very cool state manager that I wrote.
Was it bidirectional? I'm putting together a design for a new site and right now I see the only way to pull it off is with the dispatcher / controller being bidirectional.
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: Was it bidirectional?
Well, with WPF / MVC, things are a mess. The view can update the model because you want the property changed event to trigger, for example.
The clarity that we achieved is that view has its view-model and can do anything within that limited scope -- it owns it's own domain, if you will. However, anything that affects the model that the rest of the world sees goes through the dispatcher (which can be property change events but is usually a button click event or some external thing like a card swipe, bill acceptor read, or some device erroring out.)
That was the theory. In reality, it was simpler to allow the view to update the model and thus it was bidirectional. But that's because certain fields, like zipcode, seemed ridiculous to go through and action->dispatcher->store sequence to update something that was exclusively informational.
Marc
|
|
|
|
|
Marc Clifton wrote: The clarity that we achieved is that view has its view-model and can do anything within that limited scope -- it owns it's own domain, if you will. However, anything that affects the model that the rest of the world sees goes through the dispatcher (which can be property change events but is usually a button click event or some external thing like a card swipe, bill acceptor read, or some device erroring out.)
This is what I'm going with. At first I called it MVVMC, but now I'm not sure since it's a "controller" in MVC compared to a dispatcher, but whatever. I'm liking it this though, and I'm ok with having a VM update going requiring an action that filters through the dispatcher. Not sure what the hell to call it though, as I don't think "Flux" supports ViewModels.
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: Not sure what the hell to call it though, as I don't think "Flux" supports ViewModels.
Yeah, I know, we had the same issue. One of the things that we learned in this process is, if you think you're architecture is doing ok, stick with it. There were a few times we almost tossed out the state manager, but we stuck with it and it has evolved into a very useful thing. We do a lot of async/await stuff (there's a layer of complexity -- it sounds so easy but it's not) so we ended up with features like the ability to defer state changes until the async stuff completed, and so forth. Works well with the "wizard-like" nature of a kiosk.
Marc
|
|
|
|