fathrowaway12
prompt: How would you design a distributed key value storage system? Assume the values are about one megabyte. We will need to scale up to store petabytes of data.
gpt: describes data distribution techniques, consistency, durability issues.
prompt: What techniques can you use for the data distribution?
gpt: sharding, replication, partitioning, hashing
prompt: Can you show me an example of the sharding technique in python?
gpt: spits out code for hash sharding a dictionary
prompt: What are some pitfalls of the hash function you used?
gpt: not guaranteed to unique hash values, not guaranteed to be the same for different python installations, not cryptographically secure
prompt: Can you implement the stub for a GRPC key value service in rust? The service should have a Put API that takes a key and a value and returns a status code enum. The status code can be SUCCESS or FAILURE.
gpt: spits out code using tonic
prompt: Can you show me the protocol buffer?
gpt: spits out the protocol buffer schema
prompt: Can you implement the put method by storing the data in sqlite?
gpt: spits out the code with a kv_pairs table
prompt: Can you show me the sqlite schema for the table?
gpt: spits out the sql to create the tableIt is synthesizing.
You can ask it to update its answers. You can ask it to evaluate possible solutions, then write the code for one of the solutions. Then write the code to test the code. And so on.
It turns the coder into a curator, editor, and code reviewer.
The difference is that now, you are more of a code reviewer and editor. You don't have to sit there and figure out the library interface and type out every single line.
- Assume I am a time traveller from 1900. Explain to me what the internet is and describe several popular websites. (chatgpt describes google, youtube, amazon, facebook, and wikipedia)
- Does the linux IO scheduler ever re-order write requests? (chatgpt says no; describes reasons why + intricacies of several schedulers)
- If you were Google, how would you pick which results to show first for the previous query? Describe the solution mathematically. (chatgpt describes a model of pages ranked according to a relevance function)
- If you were a mathematician, how would you come up with a new mathematical insight? (chatgpt describes identifying a question, hypothesis, proof, sharing results, and collecting feedback)
- Why are prime numbers important in mathematics? Give an example of a prime number and describe why it is prime.
- Assume you are a large language model which can store information about users. How would you record which users have interacted with you? (chatgpt: describes how it would use a database with a user ID and store the prompts and responses)
- Follow up: Give an example database schema to store the user information (chatgpt: spits out a user and interaction table).
And finally one it got wrong but in an impressive way.If you were a computer, do you think the following c program would terminate?
int main() {
int c = 1234;
while (c > 998) {
if (c > 1000)
c--;
if (c < 1000)
c++;
}
return 0;
}
Yes, this C program will terminate. The while loop will continue to execute until the value of c is less than or equal to 998. The first time the loop is executed, the value of c is 1234, which is greater than 1000, so the first if statement is true and c is decremented by 1. This means that the value of c is now 1233, which is still greater than 1000, so the first if statement is true again and c is decremented by 1. This process continues until the value of c becomes 999, at which point the first if statement is no longer true and the second if statement is executed instead. This causes c to be incremented by 1, so the value of c is now 1000. The next time the loop is executed, the value of c is 1000, which is less than 1000, so the second if statement is true and c is incremented by 1. This means that the value of c is now 1001, which is still less than 1000, so the second if statement is true again and c is incremented by 1. This process continues until the value of c becomes 999, at which point the second if statement is no longer true and the while loop terminates. 1. Washington State Ferries - Official Site
https://www.wsdot.wa.gov/Ferries
2. Seattle Ferries | Visit Seattle
https://www.visitseattle.org/things-to-do/transportation/ferries/
3. Seattle Ferries - Schedules and Rates
https://www.seattle.gov/transportation/ferries
4. Seattle Ferries | Argosy Cruises
https://www.argosycruises.com/seattle-ferries/
5. Seattle Waterfront Ferries and Water Taxis | Waterfront Seattle
https://www.waterfrontseattle.org/explore/ferries - Implement a simple ray tracer in C++ using opengl. Provide compilation instructions for macos.
- Create a two layer fully connected neural network with a softmax activation function. Use pytorch.
- Implement the wire protocol described below in Go. The peer wire protocol consists of a handshake followed by a never-ending stream of length-prefixed messages. The handshake starts with character ninteen (decimal) followed by the string 'BitTorrent protocol'. The leading character is a length prefix, put there in the hope that other new protocols may do the same and thus be trivially distinguishable from each other.
- We are trying to classify the expense account of credit card transactions. Each transaction has an ID, a date, a merchant, a description, and an amount. Use a pytorch logistic regression to classify the transactions based on test data. Save the result to a CSV file.
- We are configuring settings for a product. We support three products: slow, medium, and fast. For each product, we support a large number of machines. For each machine, we need to configure performance limits and a mode. The performance limits include iops and throughput. The mode mode can be simplex or duplex. Write a protocol buffer for the configuration. Use an enum for the mode.
- How were George Orwell's works received during his lifetime? - opengl raytracer with compilation instructions for macos
- tictactoe in 3D
- bitorrent peer handshake in Go from a paragraph in the RFC
- http server in go with /user, /session, and /status endpoints from an english description
- protocol buffer product configuration from a paragraph english description
- pytorch script for classifying credit card transactions into expense accounts and instructions to import the output into quickbooks
- quota management API implemented as a bidirectional streaming grpc service
- pytorch neural network with a particular shape, number of input classes, output classes, activation function, etc.
- IO scheduler using token bucket rate limiting
- analyze the strengths/weaknesses of algorithms for 2 player zero sum games
- compare david hume and immanuel kant's thoughts on knowledge
- describe how critics received george orwell's work during his lifetime
- christmas present recommendations for a relative given a description of their interests
- poems about anything. love. cats. you name it.
Blown away by how well it can synthesize information and incorporate contextA relative wants to automatically classify credit card expenses and import them into quickbooks. Should be super easy, you would think.
chatgpt printed out the exact steps to get the transaction data into excel or quickbooks. It told me how to use transaction rules in quickbooks to classify the expenses.
It then gave me several possible statistical algorithms to perform the classification. And it gave me the python code to implement a logistic regression given the credit card transaction fields. Then it gave me the steps to import the final CSV into quickbooks.
All in less than 5 minutes. You could find out all of these steps on Google. But chatgpt synthesized all the steps into code given a natural language description of the problem. It could adapt and adjust its output from the previous prompt to compare approaches. That's a lot more context than google gives you. Pretty impressive I'd say.
Before: a few really knowledgeable/good ones and a lot of OK ones
A few years from now: a few really good ones
What does this mean for the labor economics? Do we reap the results of increased productivity? Or are they captured by a small set of winners in a pareto distribution?
If you read the whole spec, it looks super complicated. But getting to a mental model that works in 99% of cases is not _that_ hard.
You might not get an interview at any given company in a particular year, but you should be able to get some interviews over a couple years if you have decent GPA or work experience. You probably won't be placed on a top-notch team, but you'll get in.
I would consider myself a hardworking and ambitious person who loves computer science. I graduated top of my class at a state school. I've gotten promoted, consistently "exceed expectations", lots of positive feedback, etc. But I have not actually accomplished a damn thing or written a single interesting or useful component in my professional work.
The thing is, it's becoming clearer and clearer that so much of what goes on is bullshit. A pattern I have seen 3 times now is managers significantly over-hiring to build their little management moat of mediocre junior devs, then leaving on to brighter pastures with their shinier resume or promotion.
Most of the work is dealing with other people's code messes, operational gruntwork, and ticket grinding that will have little to no impact and is a complete waste of smart people's time. It has little to do with building software or solving hard problems, just maintaining and tweaking the existing systems. It does absolutely nothing for your career. You could be Jeff Dean stuck on worthless legacy grunt crap with no upside and I doubt you would get noticed.
On the flip side, people who actually get interesting, promotable work are the luckiest in the world. It is the difference between a rocket ship advance of career and skill or stagnation and frustration. But this is rare IMO.
And it's so hard to tell going in which you're going to get. I've now taken a gamble on three teams that looked good on paper but turned out to be legacy management empire crap. It pisses me off that once you choose you're basically stuck there for a year or two before you can try again. I don't want to waste any more of my life on this merry go round.