How is okcupid programmed in c




















Everyone talks about how Google is the best search engine, but I really think that OkCupid is the most important search engine on the Web. Image: Couple has fun in bed [Bigstock]. Click here to cancel reply. Name required. Email will not be published required. Cloud-Based Tools for Android Development. All rights reserved. Remember history. And it wasen't till later when good frameworks started to become mainstream.

Nowhere near production ready for most projects. Slow as hell. Community was next to nothing. If you were to say "a web server in C" today you would be laughed out of the office. Java is chosen for "performance" because java is fast compared to ruby. C is chosen for insane optimization where writing code speed is sacrificed in favor of performance. Also note the required knowledge to write C code is significantly greater than java, as in C you have to understand how to not get memory leaked to hell while java just tells you to null out your reference when you are done with it.

You can get pretty far without understanding the JVM garbage collector. So that's that. But in reality its quite a good choice for the time. OKCupid started off with a big emphasis on tests and algorithmic matching; the current UI offers a lot more options for people who just care about photos so it's easy to underestimate how complex their matching code was in Before that, scaling a website was very expensive.

Every few months the database server would get a bad query plan and the whole hotel booking engine would grind to a halt. Handling the HTTP headers isn't hard -- the hard part is perfecting the core of your application.

Or they were unproven. As a further example, even memcached didn't exist in the beginning of Alternatively, we could've gone with Microsoft-based solution, but we had no experience in administering Windows servers. I simply don't by the reasoning. In , even if you didn't know about scalability options, you had services such as Akamai you could throw money at. I work on all sorts of technologies for a fortune-5 company.

I routinely plan for traffic loads like superbowl ads, large events like concerts where our product is paying for ad time, etc I've never seen the need to write a web server from scratch to deal with these kinds of traffic loads I can only speculate on this.

My background on web site optimization tells me that site with large traffic like OKCupid have to optimize on low levels that most web servers don't do by default or is impossible to do. General purpose web servers are not optimal in terms of speed and memory for some specific type of server settings. They probably implemented the server based on some other OS implementation and specifically hard coded some operations that can save them a processing here and there.

Similarly Nginx was developed by Igor to handle the tremendous traffic of one popular Russian web site. They're perceived as an innovator that really knows what they are doing which is why match.

Toggle navigation Bright Journey. Questions About Ask Question. But I loathe the tedium of working in C. The comparison isn't between straight-C vs. It's between C with a good glue language say, Python or Lua vs. Noob here. Where does ObjC fit into all this? I know it's primarily used in Mac development, but is there any language-specific reason it's excluded from these debates? But as a deployed system it is the worst attributes of C and of interpreted languages: a complex runtime in which many probably most of the errors that can creep into deployable Ruby code can bite you even though your code passed both compilation and static analysis.

Blocks are nice, but I say that having only used them within the past few months. It could just be that the zombies haven't eaten their way to my particular shelter yet. They may, for instance, turn out to be horrible to debug. C is a good statically-typed language, but it's a bit basic. ObjC is a good statically-typed language. ObjC isn't statically-typed. Static typing informations only allows the compiler to warn the programmer about type mismatch.

From the official docs: "Statically typed objects have the same internal data structures as objects declared to be of type id. The type doesn't affect the object; it affects only the amount of information given to the compiler about the object and the amount of information available to those reading the source code. Objective-C is a good statically typed language? I must admit that this is new to me How exactly is Obj-C "good"? Is it safer than C?

Perhaps less verbose? Or maybe it's easier to use - libraries aside? Is it better because it runs on more platforms? Because it's standardized? If all else fails, I think it must be the way that it manages to merge two completely different programming paradigms by just stapling them one onto the other. ObjC can use both static and dynamic typing. Is it still a glue language if you have more glue than material? This affects team core skills, build systems, testing, debugging! If you have more glue than material, you're doing it right.

This is not a linked list, it's a dynamic array. That's a pedantic comment to make, given that Python doesn't care about the difference.

Ruby calls the same thing an "Array". Well you've clearly never had to worry about memory paging and the cost of indirection, like I have actually from memory I think you must have at some point? The difference is real and significant.

Try writing a particle system using a linked-list over a vector, the speed difference will be crippling. The point is that you don't have to worry about the difference in Python, because you don't use Python for the parts where performance matters. If you've got a million instances in your collection, you probably want to write your data structure and key traversal functions in C. Python has a sequence protocol, so you can easily wrap it to operate on it just like a native list which is really a vector , but the operations that need to be fast should be in heavily-optimized C.

The performance difference between a vector and a list has nothing at all to do with what we're talking about. Stop picking random things in the discussion to nerd out about. We get it, you're awesome. The point is that in Python the distinction isn't made. No, it does. There's a type in Python called "deque" that more closely resembles the performance characteristics of a linked list. I agree that this is not the main point of the discussion, though.

JeremyBanks on March 11, root parent prev next [—]. Python has a linked list type collections. Treating it as a linked list could screw you. I don't think that's pedantic at all. The discussion is about how easy it is to use basic data types, not about what those data types are. See chaiscriptor QTScript.

This claim sure doesn't jive to me. I got a simulation that does millions of GIS calculations involving entity tracks and regions. Moving the object graph into Perl or Python would take six hour runtimes into weeks.

And writing it in C would be sheer torture. Perhaps, but I don't think the situation would be as awful as you suggest. I'm surprised no one has mentioned Lightroom yet.

This is more productive than C and glue language. I absolutely LOVE not having to reinvent wheels like hash tables. Recently, boost added an interval data structure.

I just wrote a few lines to expose those functions as Tcl commands. Whammo, I could prototype all I wanted in Tcl! Good C programmers also do not reinvent the hash table wheel. When C was invented, half of all coding was systems programming.

C does a great job of addressing that need, that's why it's a fine language. The fact that C is not great for GUI apps does not diminish C's quality for what it is, it's just not designed for that level of abstraction. Game programming is a notable exception. The "which parts to avoid" conundrum shows up as every outfit that uses it in any serious way has a different set of "which parts to avoid". It is just a mess. STL is great. It took a couple hours. It is flat-out not true that you need to write data structures in C each time you use them.

The programmers that do this are, in my limited experience, uniformly bad. I wouldn't even write a linked-list for fear of screwing up a corner case on deletion.

There are libraries for everything, and they're plenty fast. They're just less pretty looking. Assuming you can use STL. C was a great language when it was created, considering the requirements and constraints of that time.



0コメント

  • 1000 / 1000