Professor Answers Coding Questions

United States News News

Professor Answers Coding Questions
United States Latest News,United States Headlines
  • 📰 WIRED
  • ⏱ Reading Time:
  • 725 sec. here
  • 14 min. at publisher
  • 📊 Quality Score:
  • News: 293%
  • Publisher: 51%

UC Berkeley Computer Science Professor Sarah Chasins joins WIRED to answer the internet's burning questions about coding.

I am here today to answer your questions from the internet.it depends on if it's a reference to law tech or not,that was ever put up is still available to us,So this is a webpage put up in the early ninetiesbecause Tim Berners-Lee is actually the personin a totally readable and manageable mannerwhat it would've looked like in a browser at that time,but of course, it shows up very differently,the browsers they had made at the timeon how to actually browse through the rest of the page,Admirable_Long9546 asks, New to coding.

Every skill that you have ever learned in your lifewhen you started riding a bike, eventually became automatic,the exact same thing is gonna happen with programming.asks, Can I still learn programming if I hate math?that make some kinds of programming easier,That matter, there's some kinds of video gamesThere are lots of different skills out therewith some of the same things that you're gonna needThere are certainly, there are some typesthat probably would demand a little math from you,with some parts of math, but no,Someone on the internet asks,In about the early seventies,We didn't have the internet yet, and so you could go aheadIt would print something out on the screenThen they had to come up with the ReaperHow did programmers code the first ever code?that we all look at by modern standards and say, yep.like sort of old-school telephone switchboards,how you're communicating what you want it to do.and you're punching holes in it,for a long time before we started storing programsThis was really painful.Grace Hopper, developed the term compiler.and came up with the idea that,that is actually gonna do the compiling for us,for putting together a bunch of different sort of portionsand getting them to talk to each other,we have piled all this extra stuff on top of it,actually no longer even looks like a compiler to us, right?that we've built up on top of it. Better-Sir9013,if they're all just same lines of code?A big thing that I tend to think aboutto be automatically trying to capture some kinds of bugsthat might come back to bite you later.put in whatever bugs you wanna put in,There are other programming languages that are saying,but I'm gonna try to catch some bugs,from you in order to do that,and then you might have some other language over hereas it can possibly catch,so it's gonna make you work harder, but in exchange,An example of something in that general zone would be Rust.Unfortunately, the answer is not as much programmingbecause they like programming,is talking with other programmershow to make all of this sort of big codebase work together,and you're figuring out what their needs are.and then you're squeezing in as muchIs Python really the second best language for everything?to get a dig in on Python a little bit,but the other way of reading thisThere's all kinds of programs that you could comfortably goI have a personal fondness for Python,Is it worth learning C++ in 2025?if you're entering an existing codebaseIt's already written in C++, you're gonna probably use C++.Why is Rust the most loved programming languageRust is probably oneThey have been incredibly thoughtfulOne of the things that people are really excited aboutHonestly, that does actually matter a lotbut if you look even more deeply into the designof new research in programming languages land,about how we can help programs catch more bugs.it should be looking out for the thingsthat the other languages out thereoh, I'm gonna have to use C in order to write thisyou might also be thinking about Rust at this point,Star_Knight12 says, JavaScript is a GOATED language.I think in general, there are some reasonsif you're feeling dissatisfied with JavaScript,and you're so frustrated at being locked into JavaScript,Brilliant-Sir-5729 asks,I would like to write out this kind of program,and then all of those steps that it takesall the way down to the ones and zeros,or you might instead write an interpreter.but basically yeah, what it takes is an idea,we have all of these existing programming languages,in a way that's maybe easier for you,that compiles from Unicorn Lang to Rust,Now that I have this Rust program coming out the other end,to the ones and zeros, so you can start stacking togetherWhen we're writing numbers in our day-today life,whereas for computers, as we've talked about a bit,The very first computer that we all sort of recognizeRemember that the way that we're representingis flowing through a part of the computer,On the other side of the wall,of the dimmer switchand every time I yell out to you,you're probably gonna be able to do that pretty reliably.and you're probably still gonna be ableon the dimmer switch, and I want you to be able to yell out,but remember, you're in the other room.so say I stick it to five.some of the time, you're probably yelling out six,It can be done to use base 10 inside the computer,is flowing through this, it's a lot easier.Illustrious_Run4733 is asking,Basically, the answer comes down to your mental modelIf you're going through the process of writing something up,if your mental model is aligned with the program,okay, this is what I'm expecting the program to do,and so you're sort of building up the program bit by bit,If we hit the point where we are doing debugging,then our mental model and what the program is actually doingto build up the mental model from scratch.and do that sort of difficult process of reading code,How do you guys remember all the syntax?I'm gonna go, and I'm gonna be trying to speakIn contrast, if I am at the editorIf I've forgotten something, I can just look it up,frontend, or full-stack?so it could take a few years to be really,but to get a sense of what the day-to-day would look like,of what these programs look likeSo I absolutely love this question,I specifically think about programming languages work,I think that's really powerful and really exciting,go out and talk to the peoplethat I give my PhD students all the time,that are doing the kind of workwho is currently basically embedded in a biology lab.he's in their labs helping with programming tasks.because unfortunately. it's not quite as simple as, okay,to type up one or two paragraphs about their problems,and what are the things we could do to fill it?I think it's really powerful.to build my own game engine from scratch?In general, a big thingto have access to, basically,that is gonna do one big, long thing,and so what you're doing when you build your own game enginethat people are gonna need to reuse and reuse and reuse?especially if you're thinking about maybe a 3D game,and it is gonna take you some time to get there.depending on how low-level you're deciding to go,you're not gonna have to deal with this,you're gonna end up doing a lot of computer graphics typeand if you are interested in game programming,but it's definitely not gonna be the fastest routeCompared to other tech breakthroughs, I say not so much.where the goal is to put together wordsChatGPT is built on a kind of programfor putting together words that look good together,actually took was, okay, what we're gonna dowe can find on the web, all the webpages themselves,and these are basically words that humans have put together,and so we're gonna make it play the fill-in-the-blank gameso I'm gonna go ahead and feed that to the program,You say, no you silly program, not sky.with a blank instead, so it's the blank has four legs,So you repeat this process for about 300,and then get them togetherand you might say, Sarah, this doesn't seem okay.You are trying to get it to cheat, you want it to cheat,and if you've ever heard something about sort of the numberof the cheat sheet that it was given.400 years of compute time, and then at the end of that,Now, this does not automatically give you ChatGPT,because now, we just make a new document,and then the next part of the documentAnd so it now fills in the blank,and so maybe it says the, and then you go again,and maybe now the next word it comes up with is capital,and so that is what is going on with large language models.gptgirlnextdoor is asking, With AI advancing so fast,to write code the old-fashioned way, for the most part,so the first thing is that a really big skillYou're starting from this big, amorphous,well I can break, it into these two chunks,and you keep doing this all the way downor a couple lines of code.and so if you're just giving sort of these big, vague,into useful program that's actually gonna work and run.that I would write if I'm a non-programmerOver the course of all the documentsthe documents that had code in themthe sort of programmer-style human language descriptionsthat a programmer would write might produce good code,In order to use these tools, these generative AI tools,how to write programs the old-fashioned way,Minute_Order4809 asks,Double check, but if you've decided, yeah, I'm going for it,into the smallest portion of that problemthat's gonna be about maybe five-ish lines of code,write it out in pseudocode,this is exactly the thing that the computer's gonna do,and it basically looks like writingYou're not worried about if you're missing a semicolonand then you have to have a concrete planDo you have 20 tests that you're gonna run?and make sure that it's actually doing the right thing,that it's actually doing the right thing?AdHistorical6271 is asking, Experienced developers,of those large language models or something like ChatGPTto generate a program,by just typing a program in our programming language.that has already been written many, many, many times before.The best bet, really,to actually do the program.about this that looked at sort of the differencesthat it makes them more productive.but even after doing the task with the tool,What does live coding actually look like?I don't really know what the alternative is,about doing it in front of an audience, like y'all,and we're basically gonna use this as an opportunity to see,but we're just gonna talk it through step by step?so we have this URL,that you might type into a browser,but then here, we have sort of a smaller list.so let's go ahead and print your country codes,referring to the first item in the list,This is called tiny_map, so I will run tiny_map.but maybe I want to actually use those strings,so instead of just having the country code,with the country code that we are trying to use.and again, we're gonna have to do the thingWe are now seeing our variants of the URL.we've got the one that has Canada.We are probably trying to actually do something interestingthe same way we would if we popped it into a browser,has made a bunch of little program snippets,I'm gonna make it available, we would call that a library.and we'll go ahead and repeat that processto get pretty bored of just retyping outthat could help me avoid doing all that copying and pasting,A loop is gonna let us do something repeatedlyor for which we want to do the same kind of thing,Let's probably go ahead and do that request,I'm probably gonna wanna do it for the eighth item,but I'm gonna show that this is, in fact,JSON is just one of those standard formats that we haveso if you have a standardized way,that we're getting back by running each of those requests.Let's add ourselves a couple little sort of separators,Okay, we are now seeing, these are split apartI'm looking for this life expectancy data,is that, and I know that the particular partis this numeric value thing right here,so that I don't have to just look through all of this.We'll call this just the JSON, and then we can go aheadso JSON, I think this is inside the value,Let's maybe call that life expectancy.and we just have to make sure that we have stored it,Let's print out both the country codeWe can see the life expectancyOkay, let's go ahead and actually save that data,This one will be empty, and we're gonna go aheadfrom going out to the web and saying,Let's also go ahead and add it into data,and life expectancy.like we're expecting it to look.Again, we're gonna wanna use a nice librarySo now, instead of just printing the data,and let's use our data, and now we're gonna have to tell it,So I'm gonna say locations, and I'm gonna have that be zero,we can see country code is on the left,or in the sort of more usual terminologySo let's go ahead and say color equals one,We've got our program ready to go.We probably are interested in doing itand actually change which of these lists we're using,but why not run it for all the countries, right?and let's get rid of all these old, unnecessary lines,it's gonna collect the informationI think it was a little under a minute, we've got our map.This is honestly an incredibly difficult question to answer,It's not like when we're sitting down to a piece of text,that's not how we typically do it when we're reading code.but if this code is not malicious, go ahead and run it.Go figure out what part of that codeWhat were the outputs that came outThere are even debuggers that are specially builtso one of my favorite kinds of debuggers that I really likethat you're interested in,to see what was happening before.vidro3 asks, How do computers understand code?I'm gonna show us how we get from somethingall the way down to the ones and zerosand we'll draw the four stages that we take it through.so here we go, we've got one plus two plus four.to treat separately versus together.the one is gonna be on its own, the plus sign, the two,We've got our left parenthesis, our one, our plus, our two,that is called lexing or tokenizing,are the tokens, so the next thing we're gonna wanna doto understand something about the structure of this program,we're gonna have the addition operator,because what we wanna do is we wanna make surewe actually wanna do that first,and then what we have on that last branch therethat there's some structure happening here.and then whatever we get out from that operation,that what goes into the computerto turn this into ones and zeros,and instructions are basically just gonna be the things'cause that's the first value that we're dealing with,and then maybe we'll move into R9, another slot,so let's go ahead and do an add instruction,from R8 and R9, and that is gonna put that value inside R8.for the thing we were previously using,we should get the result of the entire program in there.that nice, structured representation of the programbut at some point, it actually has to turnacross these instructions.and then there's this thing, and then there's this thing,and then we do the exact same processso now, I'm gonna turn to the computer.This is just a website. You can visit this on your browser.and so we're now gonna get to see what it actually doesSo here we go. We start with that first move instruction.so let's go ahead and run the next step.If we keep going, we're now gonna seethat now lives inside R8.We're not overriding anything we're gonna need later,and we can see that we've done that last addition,understands the code that you write.I hope you're excited about programming languages

We have summarized this news so that you can read it quickly. If you are interested in the news, you can read the full text here. Read more:

WIRED /  🏆 555. in US

 

United States Latest News, United States Headlines

Similar News:You can also read news stories similar to this one that we have collected from other news sources.

NYT Connections Hints Today: Monday, December 8 Clues And Answers (#911)NYT Connections Hints Today: Monday, December 8 Clues And Answers (#911)Looking for today's NYT Connections hints? Some help and the answers for today's game are right here to help keep your streak alive.
Read more »

NYT Connections Hints Today: Tuesday, December 9 Clues And Answers (#912)NYT Connections Hints Today: Tuesday, December 9 Clues And Answers (#912)Looking for today's NYT Connections hints? Some help and the answers for today's game are right here to help keep your streak alive.
Read more »

CFP committee’s logic falls apart; even Yurachek can’t justify itCFP committee’s logic falls apart; even Yurachek can’t justify itBaffling defense of committee’s argument leaves fans, analysts with more questions than answers
Read more »

UC Berkeley professor installed secret camera, allegedly catching PhD candidate sabotaging fellow student’s workUC Berkeley professor installed secret camera, allegedly catching PhD candidate sabotaging fellow student’s workThere was more than $46,000 in damage over the years, most of it targeting one particular student’s work.
Read more »

Answers to 25 big questions about the Rockefeller Center Christmas treeAnswers to 25 big questions about the Rockefeller Center Christmas treeHow tall is the Rockefeller Center Christmas tree? How many lights are on it? Here’s what to know about the New York City tradition outside 30 Rock.
Read more »

The Boys Season 5 Trailer Answers 2 Major Questions From Season 4's FinaleThe Boys Season 5 Trailer Answers 2 Major Questions From Season 4's FinaleErin Moriarty as Starlight in The Boys
Read more »



Render Time: 2026-04-01 20:38:32