About duplicate contacts and calendars on iPhone 3.0
When I synced my iPhone after the iPhone 3.0 OS upgrade, I wound up with double contacts and calendar entries. Checking every Mac in the house, as well as MobileMe, though, revealed no duplicate…
Another interesting IRC talk about MVC vs. Multi-tiered architecture
- iwaffles: So you do form validation in the controller in CI?
- mtheoryx83: well, they may not do well with bugs, but if it gets bad enough, it's easily and legally forked
- mtheoryx83: iwaffles: yes
- iwaffles: Interesting..
- jtaby: mtheoryx83, ok, but what's the point, if it's not legitimit
- mtheoryx83: it's totally logical
- mtheoryx83: jtaby: what's legitimate and what's not?
- iwaffles: mtheoryx83: So is doing it in the model :-P
- jtaby: mtheoryx83, not legitimate in a legal sense, in a social sense
- mtheoryx83: iwaffles: no, not in the model
- jtaby: I guess "official"
- iwaffles: Why not?
- mtheoryx83: validation is logic
- mtheoryx83: logic goes in the controller
- jtaby: mtheoryx83, in Rails, the concept is that validation is done in the model, since that's where the data goes
- iwaffles: I guess you could think of it that way
- jtaby: and keeping validation close to the data ensures the firewall
- iwaffles: It really depends
- * bnewton has quit (Success)
- mtheoryx83: jtaby: the real "community" of serious users wouldn't use a bug-ridden "official" one if there's a better option
- * vang (n=repol47@65-205-124-91.pool.ukrtel.net) has joined #codeigniter
- mtheoryx83: jtaby: validation isn't about the data
- iwaffles: As long as you have consistency throughout your app it doesn't really matter
- jtaby: i.e. you may be inserting data into the model from multiple places
- jtaby: mtheoryx83, how so?
- mtheoryx83: validation is rules on form fields
- mtheoryx83: it's logic in the strictest sense
- jtaby: or you can look at it as: validation is the set of invariants that the data must pass through
- jtaby: it defines the data
- jtaby: in a sense
- mtheoryx83: jtaby: I don't think it defines the data. Your model could be perfectly able to deal with someone who has a first name that is 40 characters long, but in the context of a given controller, you may want to limit that input. that's logic.
- mtheoryx83: crappy example, i know
- mtheoryx83: i can see it both ways
- jtaby: mtheoryx83, In true MVC, the model is application specific
- mtheoryx83: but i think the controller is better because if your form data hasn't passed validation, it's not even "data" that your model should give two shits about yet
- * el2ro has quit ("ChatZilla 0.9.84 [Firefox 3.0.8/2009032609]")
- jtaby: But like I said, you can be potentially inserting data into the model from mutliple places
- mtheoryx83: of course, I could be so accustomed to CI's loose mvc that I'm not sure how it's done elsewhere
- jtaby: having the validation in your controller means you're only checking through that one gateway
- iwaffles: :-P
- mtheoryx83: yeah, i see what you mean
- jtaby: i suppose it can work either way
- mtheoryx83: I say we just take whatever from $_POST and put it right in the db
- mtheoryx83: j/k
- jtaby: mtheoryx83, here's why I think there's a confusion
- jtaby: Rails, Symfony, CI, Cake, Django
- jtaby: none of these use MVC
- jtaby: it's a lie
- jtaby: you've been cheated out of a design pattern
- jtaby: it uses an n-tiered architecture, not MVC
- mtheoryx83: It's just like the cake, it's a lie
- jtaby: MVC is organized into a triangle
- jtaby: it's not a linear pattern
- mtheoryx83: I've been thinking about that a bit as well
- mtheoryx83: calling models from views
- jtaby: http://en.wikipedia.org/wiki/Multitier_architecture#Comparison_with_the_MVC_architecture
- jtaby: The model is supposed to update the views
- mtheoryx83: that's frowned upon, but should be allowed, no?
- jtaby: the controller is supposed to be a mapper between the view and the map, thus it contains the business logic
- jtaby: the model contains the application logic
- jtaby: But in the context of web development, the model and the view are disconnected
- jtaby: One is on the server, one is on the client
- jtaby: so you can't have that third connection
- mtheoryx83: Interesting
- jtaby: Now, if you use something like SproutCore or Cappuccino, you can actually implement "true" MVC
- jtaby: because the model is housed within the browser
- mtheoryx83: I've been meaning to look at both of those
- jtaby: and they do, you should checkout Sproutcore's bindings
- jtaby: it's absolutely beautiful
- mtheoryx83: Apple's iWork.com is a SproutCore app ;P
- jtaby: and MobileMe.com :)
- mtheoryx83: Yes, that too
Interesting conversation about web vs desktop development on ##c++
- jtaby: not to be a jerk, but I think i'm going to be avoiding c++ post university
- swmc: and if you think of virtual functions as tables of function pointers, =0 for pure virtual makes perfect sense
- swmc: (not that you should have to)
- aja: jtaby: If you want to be a professional programmer of any repute, hard to avoid it.
- jtaby: aja: well, depends on the domain you work in
- aja: jtaby: Not really. Even in exclusively java shops that I've worked it, the fellows with C++ background were the better programmers. They had a better grasp on the why, not just the how.
- swmc: !ggl joelonsoftware "back to basics"
- nolyc http: //www.joelonsoftware.com/articles/fog0000000319.html
- aja: jtaby: And, other programmers will tend to judge you on the languages you can code in.
- fow !fs painter's
- nolyc Shlemiel the painter's algorithm is O(n*n) for no good reason--the same task can be done in O(n) easily. See http: //www.joelonsoftware.com/articles/fog0000000319.html
- jtaby: Yeah i've read spolsky's essay on it
- fow : )
- swmc: I always spell Shlemiel wrong :|
- jtaby: but that's not knowledge that's tied to c++
- jtaby: c++ is just a language
- jtaby: learning c++ doesn't mean your'e a more apt programmer
- swmc: jtaby: C++ is pretty much the only systems programming language left, though, outside of perhaps ada for DoD contracts
- aja: jtaby: True. But C++ is a very complex language that is used in a wide variety of high-performance domains. It's acceptable not to know it, but you will be judged by that fact.
- jtaby: aja: The point I was trying to make is that in the web development world, c++ plays a much smaller role
- aja: jtaby: True. But that's also a ghetto where you keep bad programmers, because everything is latency-bound.
- jtaby: and it's true, learning the innerds of c++ will expose you to lower-level details that higher level languages just abstract away for you
- jtaby: haha did you just diss all web developers?
- swmc: jtaby: and the knowledge is what matters, but they only way to assess it, pretty much, is in programming languages that require it
- aja: (correction: There are a lot of excellent web programmers. Unfortunately, they are a much smaller minority than in most other domains).
- jtaby: but correlation != causation
- aja: jtaby: Yes. But correlation is predictive.
- jtaby: but not indicative
- aja: jtaby: In other words, an excellent web programmer is an excellent programmer. An average web programmer is a poor programmer.
- jtaby: aja: point taken
- jtaby: but I feel like that's a result of high level languages, noit the web itself
- aja: jtaby: Partly. But part of it is that, frankly, people don't seem to care as much. Google and Amazon are about the only companies, off the top of my head, that seem to truly care about high-performance and high-quality in web programming. Even Apple's cloud stuff is sub-standard.
- aja: jtaby: Anyway, I tend to dismiss any programmer who hasn't seriously coded in multiple languages and multiple platforms.
- swmc: jtaby: I think it's more due to the fact that web development is so dominated by thin wrappers over databases
- aja: jtaby: Including higher level languages and web programs.
- jtaby: aja: well, don't forget that the latency of web applications isn't in the processing time, rather with the fact that you're moving bits across the planets, as opposed to centimeters
- jtaby: and the speend enhancements that amazon and google engage in are more in terms of load balancing and network setup rather than efficient programming, though that's very important for them
- swmc: jtaby: when you have a medium where high latency and bad UIs are the norm and there's minimal logic required, there's less to attract the really good programmers
- aja: jtaby: True. But when you start trying to handle millions of connections, not paying attention to that starts showing up. And there are damn few sites out there you can't take down with a well-placed posting to slashdot or reddit. That's unacceptable.
- jtaby: granted, but that's almost always isn't a result of bad programming, rather it's because of hardware limitations
- aja: jtaby: Agreed about the load-balancing. BUt it's not like distributed server farms are a new idea.
- jtaby: granted.
- aja: jtaby: Ah, but the bad programming shows up when you want to move to new hardware and the code won't handle it. Which is insanely common. Migrations that should take minutes take months.
- gparent The funny thing is that Slashdot handles the slashdot effect every day, and I've never seen it down.
- jtaby: aja: well yeah, if you don't program with scalability in mind, you can't just tag it on
- jtaby: swmc: aja: but I know what your'e saying: The web enviornment attracks bad programmers
- swmc: just like parallelism, extensability, and a whole host of other things can't just be tacked on
- jtaby: aja: btw, why don't you like Apple's cloud services?
- swmc: The fact that big professional web projects (are you listening, WebCT?) are also terrible doesn't help
- aja: jtaby: I've got a mac.com account, and it's been "down for upgrade" at least twice in the last 24 months, syncing takes waaaay to long, and it's unstable for large binary files.
- jtaby: aja: yeah when mobileme was released they had issues, but those have all been worked out
- jtaby: webct == blackboard?
- aja: jtaby: Agreed. It's been pretty good the last 6 months or so. And I do like my ipod syncronization stuff.
- swmc: jtaby: yes
- fow raji, I have to ask. Is your current approach /really/ the best way?
- aja: jtaby: Yes.
- jtaby: aja: do you liek the new interfaces?
- jtaby: *like
- jtaby: I really think MVC Javascript is the future of web apps
- jtaby: ..but we're getting too offtopic now
- aja: jtaby: Don't have a strong opinion one way or the other. Seems to work. I'm a console guy, so I get vaguely annoyed with anything that has graphics. :-)
- jtaby: aja: same :)
- aja: jtaby: Yes. I have a habit of going OT.
Scripted window management in Xcode
Xcode’s placement of windows and views has never entirely satisfied me. In this post, I’ll show you a series of Applescripts that I use to create my own arrangement of Xcode windows so that I can…
How-To Tuesday: Arduino 101 potentiometers and servos
This is the 3rd installment of my Aduino How-To Tuesdays. This week I am going to cover using another basic part, the potentiometer. I will also cover connecting a servo to the Arduino….
Cufon Font Replacement
A text replacement alternative to sIFR that requires no images or Flash, instead using Canvas and VML to create a similar effect. Can’t wait for CSS3…
Cufon Font Replacement
A text replacement alternative to sIFR that requires no images or Flash, instead using Canvas and VML to create a similar effect. Can’t wait for CSS3…
DoubleTwist
DoubleTwist, the universal media hub from a team led by Jon Lech Johansen, is now available as a public beta for Mac OS X. Interesting and ambitious: DoubleTwist acts as a sort of universal digital…
Pure CSS Line Graph
A simple and accessible way to show data in a line graph format using nothing but CSS.
Tags Review: Dead Simple File Tagging
A form of organization that has been around for some time, but is just starting to become popular is tagging. In tagging, you assign one (or more) word descriptions to something. Each…
Layer-related shortcuts you might want to know
Based on some recent comments (e.g. “Please add a way to navigate through layers via the keyboard”), I get the impression that many people don’t know some/all of the following:
- Opt/Alt +…
Simple Plug-in Brings Hulu to Your XBMC [XBox Media Center]
If you’re sporting a modded Xbox with XBMC and you’re envious of its cousin Boxee’s native Hulu streaming, rejoice! A plug-in can bring The Office and other NBC/Fox shows to the Xbox Media…
Simple Plug-in Brings Hulu to Your XBMC [XBox Media Center]
If you’re sporting a modded Xbox with XBMC and you’re envious of its cousin Boxee’s native Hulu streaming, rejoice! A plug-in can bring The Office and other NBC/Fox shows to the Xbox Media…
Balsamiq Mockups: Wireframing For the Rest of Us

There are several different ways to design a website or a software application. Some people like to start with Photoshop or Illustrator and create the complete design. Others like to start with…
Jim Lehrer For PBS's Series Make 'Em Laugh
I had to watch this twice to actually get the jokes! If you’ve ever watched the venerable Jim Lehrer of The Newshour With Jim Lehrer, you’ll know this Southern gent is all business. So when he…