Hacker Newsnew | past | comments | ask | show | jobs | submit | more insertion's commentslogin

As someone who is more familiar with OOP, I would love to see examples/hear more alternative approaches to organising code.

Let's say that you want to design a CRUD app, but you're not going to use OOP. What are some of the ways you could choose to structure your code? Would you still use a pattern like MVC?


My main issue with OOP is that classes/objects conflate a whole bunch of notions, and end up not being very good at any of them.

Modularity and design-by-contract are better implemented by module systems ( http://en.wikipedia.org/wiki/Standard_ML#Module_system )

Encapsulation is better served by lexical scope ( http://en.wikipedia.org/wiki/Scope_(computer_science)#Lexica... )

Data is better modelled by algebraic datatypes ( http://en.wikipedia.org/wiki/Algebraic_data_type )

Type-checking is better performed structurally ( http://en.wikipedia.org/wiki/Structural_type_system )

Polymorphism is better handled by first-class functions ( http://en.wikipedia.org/wiki/First-class_function ) and parametricity ( http://en.wikipedia.org/wiki/Parametric_polymorphism )

As for an alternative to "CRUD app using MVC", I'd probably recommend Functional Reactive Programming ( http://en.wikipedia.org/wiki/Functional_reactive_programming ). MVC is a way to architect interactive simulations and games, developed in the live environment provided by SmallTalk.

However, I imagine your intention was for something closer to the server-side code of a form wizard on a Web page, rather than a game. In which case, I'd avoid MVC-style approaches completely, since they're inappropriate. It's much more straightforward to model servers as UNIX pipelines turning HTTP requests into HTTP responses ( http://en.wikipedia.org/wiki/Pipeline_(Unix) )

Pipelines turn out to be a great fit for functional programming: lots of small, single-purpose pieces, composed together into a server which requests flow into and responses flow out.


You can take a look at how apps are structured in Clojure with the [Luminus](http://www.luminusweb.net/docs) microframework as an example.


Why a countdown? Probably because they're launching a watch. Wait and see. My guess is they hint at the why during the event, probably in the opening minute or so. They will also probably use time-based headlines in the slides.


That doesn't make sense. Not unless the introduction of the tablet caused people to buy PCs and laptops. There might be some dynamics between the two, but it doesn't relate to the age of the tablet being equal to the average lifetime of a PC.


I'm a happy Backblaze customer, but I've noticed it typically uses around 240MB of memory. Is this normal? Why is it so high?


BrianW from Backblaze here. That is a little high, but is plausible in some installations. When running Backblaze on a laptop, you will notice a couple different processes running. "bzserv" should always be very very small, it doesn't do much. When you see "bztransmit", that is the process that reads your files from disk, encrypts them in RAM, and transmits them to the Backblaze datacenter. It tends to be about 30 MBytes of executable code, plus up to another 30 MBytes of the file being encrypted in RAM and transmitted. So most customers will see bztransmit bounce around at 60 MBytes RAM.

HOWEVER, there are short moments when bztransmit must read a list of files into RAM, and it can reach larger sizes like 240 MBytes. bztransmit does the deduplication, which means it must store one SHA-1 of every file it has transmitted from your computer to our datacenter. If you have a lot of files that have been transmitted (over 1 million files is "a lot") then Backblaze might reach 200 MBytes in size.


The current desktop client runs atop a JVM


Backblaze engineer here -> we absolutely DO NOT use a JVM on the client running on laptops. We love Java and use it in the datacenter on every web server and every pod. The reason we don't use it on the client running on laptops is twofold:

1) Java doesn't deploy super smoothly - The initial download might be 30 MBytes to include the JVM instead of 1 or 2 MBytes for a 'C' executable. Also, you have to keep updating the JVM separately, etc. It's friction to customers.

2) Java is hard to make look "native". Macintosh/Apple customers especially are sensitive to the look and feel of applications and like them to feel extremely "native".


Their web page disagress with you:

"No Java Software Java is responsible for 91% of security attacks. Backblaze's code is native to Mac and PC and doesn't use Java."*

It even has a big logo with Java logo crossed out.


I'm pretty sure their clients are all native.


The story is sourced to “people with knowledge of the matter.” In the same piece Google goes own the record saying “over here in our darkroom, we’re always developing new ways for people to snap, share and say cheese.” It reads almost like a comedy on sanctioned leaks.


Let’s spend a minute to think about political language. Do we want to “ban Internet fast lanes” or “ban Internet slow lanes?” I suspect that most would favor the latter.


It is indeed a poor term. I suggest calling it "bandwidth racketeering" ("Nice streaming service you have here, it'd be shame if some traffic shaping happened to it...")


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: