So for those of you who don't know me by now if you've not sat in on the code immersion sessions My name is Pat Maddox. I am primarily a Ruby Rails developer who at some point in the last six months or so discovered seaside which This is not doing what I want it to. Oh Well, I'll do without it so Seeside is a web application framework that came out or at least heard about it roughly the same time that rails did and for a number of reasons Rails gained a lot of traction, but seaside didn't quite so much but it turns out it's a pretty remarkable web framework and It's got some really unique features to it that you won't find in rails development and in the same way that rails Made a lot of things simpler about web development in general seaside Makes simplifies some other aspects of web development as well that are kind of difficult to handle in rails, so Just a quick overview it's a web framework, like I said, it's open source just like rails It's MIT license that means that you can take it use it in your own applications build upon it Use it at your business without any worries It's written in small talk. How many here identify as small talk programmers? two Two in the crowd. All right well, you're gonna find that small talk is a Beautiful language it beats the hell out of objective C as we're gonna see in a minute Trust me, I it's not even close I Small talk is or seaside is component based so instead of Setting up controllers and actions and requests and parsing stuff You've got components that manage their own state and pass control from one component to another similar to to trellis that the Brian talked about earlier today and then finally it uses continuations and By using continuations it manages a lot of your application state for you So that you don't have to be dealing with stuff in the session So you don't have to deal so you don't have to stuff things in the database in between requests and ultimately It allows you to write code that expresses the flow of your application So just to show you a quick. This is the canonical seaside example a little counter This is a fascinating web app, right? It's something in the browser You see we click a couple buttons and a number goes up and down So how does that actually get done? How are we incrementing and decrementing that number is it done with hidden form parameters or query parameters? Well, if we take a look at the HTML generated by By the little app that I wrote you'll see that it is pretty much what you expect We've got a we've got a header that shows the counter Number at that point line break and then we've got two links and the links you'll see have Very interesting URLs them probably ones that you were not going to sit out and code by hand, right? You see it goes through the slash WRWC counter has s query parameter and a k query parameter these correspond to the session and then a key within the session so kind of Well, it's actually the continuation key So at what point in the application session do you want to enter? So this will make sense in just a minute, but The important thing there is that we're not passing the value anywhere in between a form or even the query parameters We're not seeing zero. We're not seeing one. We're not seeing whatever. It's saying here's a session Here is the continuation key so It's managed in the session right, but If that's the case if we're just storing the counter ID in the session then How Do we do this? How do I open up a new tab in the same browser and You know increment my number here run through the counter example a little bit I can go back to the first instance of it Change the numbers in there and then I can go back and change the numbers. They're completely independent from each other So if you're used to Writing web applications where you store state in the session then you typically put you know a counter variable in the session And then you would look that up and then you would change it But in order to have two of those you need to do some special session handling right? You need to say that okay upon coming to this first page look up the first Counter or create a first counter variable in the session and then the second one that comes to it create a second counter variable in the session and then I To be honest I'm not entirely sure how you would do it because you would then need to encode at least something you would need to encode the Particular session counter ID that you're using in the URL so it knows which one to look up and that's what we deal with in a Rails application This is an example of the typical request response cycle that you'll see in a Rails app Client makes a request of the server the server loads any necessary state that it needs to process the request Then it handles the request it ships off a response to the client and then the interactions over done any state that exists at the end of Of this interaction then needs to be saved to a database or it needs to be stored in the session It needs to be filed out to this it needs to be saved somewhere so that when we make the next request the server can load the state again Typical stuff no surprises there. Well, we need these continuations that works a little bit differently Starts off the exact same way client makes a request of the server server loads the state processes the request and then sends a response back But now instead of ending the interaction it basically sits there waiting and it says okay after we've done this response The next line of code would be this or the next potential branches of code are these different ones? and it sits there and it waits and So it closes over the state just like closures that you're used to in Ruby It knows about the state at that point So when the next request comes in instead of starting at the top where it says loci instead of like fetching state from the database It basically starts at the bottom again right where the previous action left off so that allows us to write very clear Very clear very simple code. This is all the code that I had to write for that counter example now granted It is a very simple example but I just talked about the problems with Handling multiple counters in the session that you would have to write some kind of plumbing code to be able to look up Which counter I have to pass in a particular key This is all the code that I wrote to be able to load up two counters I can put five counters, you know, I can load up as many sessions as I want and This is small-time code. We're gonna look over the syntax in a little bit but as Ruby programmers I think that you know except for some of the specifics of you know How assignment looks and stuff this is should be pretty readable to you guys Right, and you'll notice that this is just a very basic class with an initialized method We've got an increment and a decrement method on it that increase and decrease the counter And then finally render content on is the method where we actually generate an HTML view to return to the client and You'll notice that all the HTML is generated programmatically using small-time code So we say I want a heading that corresponds to an h1 tag that we saw earlier a break is our br And then finally we have an anchor with a callback Now this is kind of interesting because the callback takes a block so the code inside of the the square brackets is a block in in small talk and So basically what we're saying is generate a link that when pressed Executes that block of code the semi-colon is For cascading messages, we're gonna look at how messages work just a minute But basically when we call this HTML as an object that represents a render anchor is a method that creates an h tag Callback says you know what's the action that you're gonna do it and then when I use a semi-colon the object that like When you call messages in small talk So we're sending the anchor message to HTML and then the callback message to anchor But now once callback runs if we put a semi-colon on it That means that the next message that goes through gets sent to the same to the same previous object that we use So in this case, we're sending two messages to anchor We're sending anchor callback and then anchor with okay, right? and so the the important bit here the interesting bit here is The callback and the block saying that when I click on this link execute this block of code That's pretty powerful stuff now one of the things that you'll find in dealing with web applications is Users hit the back button and how are you supposed to handle that? Well, let's look at this really basic example Again with the counter if I increase the number to six and then or five and then ID I hit back a few times Now I want to hit the plus link What am I gonna get on the screen? Evan says three any other guesses Six six over here. So we've got three and six raise your hand if you're in the three camp handful and six Smaller number, but the six is have it Now why is that well, let's look at a If I were to do this Exactly if I were to do this in Ruby, what would it look like this is if I have a counter control And I've got two methods on it increment and decrement And I call increment five times on it now I have saved in the database a counter with a value of five when I hit back a few times the Server or the client doesn't send any request to the server at that point It doesn't say now that I've hit back back decrement that number. We have modified the state in database So the next time I send Increment to it it increases it to six. Does that make sense? Is that clear no surprises there, but what if We do want it to be three So I got to six. I hit back a few times and then I hit plus. What if I want to do that? that you can imagine is a Very reasonable way to approach Application development that when I hit back I transition back in application state and then so I basically reverted the the changes that I made up to that point a Good example of this It remembers the state of the page at the time so once I go back Now I say when I click plus on it says okay using this continuation key now You know it we know that it's three at that point that I rendered this page So when you hit plus then it should now or sorry it was to now it should go to three Well, you are always passing the continuation key, but you never do it manually seaside handles all this stuff under the hood you never I Pretty much never look at the session key or the continuation key That's in the URL that's in the URL and the continuation key is actually the exact same as it was before so none of that changed the only difference is in How is it how I configured seaside so this component that I had now? It's that it tells seaside keep track of my states So every time I render a view these are the states that I want you to know about just in case somebody goes back okay, so this is of I Guess this is you could say That's the next slide well obvious This is one of the concerns that you have as an application developer how do you handle when somebody backtracks and there's not necessarily a correct answer in all cases most frameworks that you use Sort of push you into an answer and they don't give you much freedom With respect to how you want to handle this and in fact you'll look on many applications like loan applications There's stuff like that that say explicitly say don't use the back button here is a link to press if you want to go back Well, what happens if the user presses a back button, right? Then you're kind of host you know the example that I like to use is what if you're building a Web console for the president of the United States and he has two options He wants to perform on a country. He either wants to drop nuclear weapons or he wants to give them medicine and food Well, he acts he clicks on nuclear weapons in and his advisor comes in and says you know what that might be a bad idea But so we added the nuclear weapons feature to our aid package And then he hits back and then he chooses okay Let's give them medicine and food when he hits forward again and submit there's gonna be two things on the server State there's gonna be nuclear weapons and food so it's like boom Here's here's the medicine, right? You would like to be able to avoid that situation So seaside calls itself a heretical framework. This is from a great Simpsons episode called Homer the heretic Yes, yes when dealing with nuclear weapons always have test cases Seaside calls itself a heretical web framework in that it sort of shuns Some of the best practices that we have adopted as web developers for the most part it does not care about Fancy URLs about pretty URLs if you notice in the world has the session key It has the continuations key if you are making a product catalog for Sony and You say that the URLs are slash products underscore s 40 characters Underscore k another 30 characters. That's not going to fly right Seaside for the most part doesn't care you actually can send back pretty URL So you do have a nice URL in the browser that people can share But sort of the basis of this is that if you want to do crud if you want to do basic Websites if you want to just do resourceful stuff then Seaside is not that's not really what it's designed for you. Don't need continuations to do that You need active record. You need resource controller It also Gets away from the whole shared nothing architecture. In fact Seaside basically says share everything seaside is maintaining all your state for you So what that means is I can't go to one server and make a request and then go to a second server and make the following Request like I can in rails right in rails I can load balance across a whole bunch of different servers and because they all point to the same data set and because they all have To fetch every single bit of information they need to process a request on every single request I share none of the data so I can point to any of the servers. I want seaside on the other hand Because it maintains all the session state if I go to server one for a request I have to go to that same server for my follow-up requests now that Sounds crazy.  So Doesn't care about clean URLs Doesn't follow the shared nothing architecture and then it makes some other opinionated decisions like how you generate html Which you saw it's all programmatic. How does that fit into traditional web shop? So why? Should you care about learning seaside? Why are you interested in this? Well? Why am I interested? I'll be honest when I first picked up the seaside book. It's a free book online. I Pretty much didn't talk to my girlfriend for a week It was and I you know by Wednesday Thursday I was finding movies for her to go to and Going online to movies yahoo.com and buying a tick for her and her friend So they could go hang out for the evening and leave me alone to code on seaside So the first first aspect of it is it is fun And it is addictive and it is cool the whole environment that you deal with is is an incredibly fun refreshing environment to develop in which is Which is kind of a weird thing to say that it's refreshing given that it's like 20 years old But it's fascinating to me that modern languages Still haven't really caught up now This isn't gonna be like a seaside's amazing everything else sucks thing because I still love coding Ruby and Rails But as you use this you're gonna see some cool new techniques I think it's very mind-expanding Sort of framework and gives you a fresh approach to web application development plus you can integrate it with your existing rails Applications and you can use it for some of the things that seaside is really good at that rails is not particularly strong So there's a lot of reasons use it, but honestly I say why not like rails is already a very heterogeneous Ecosystem we have different data stores are coming up now everybody's all on board the no sequel train You know there's what nobody I mean It's only very recent that people are using Apache to deploy rails stuff anymore We have a lot of alternatives in pretty much every single part of the rails application stack So my question is why not offload some of the business logic too? And that is where seaside shines is doing the business logic and also some really cool stuff like the Ajax support in seaside Is kick-ass and comment if you're not familiar with that basically allows you to open up a connection a persistent connection to the server and and and ship out Ship out content to all the clients that are connected to it. So basically a Real-time Internet chat program in seaside is four lines of code Unfortunately, I don't have that example, but Well, it is in that it's in the seaside books if you want to go to seaside But go to the comment chapter write it and then we'll hook it up, but I've got to get through a lot of stuff here, so It's really cool, but I you know I say why not give it a shot and Just for fun as a little example I showed those components how I can open three different tabs and do Counter side-by-side Well, here's those same components in a single page and you'll notice okay I increased that one right not too exciting But then I go to the second one and I see the first one keeps it state And then I can go to the third one. I can just kind of go back through them And I can Know follow any of the links in that component that we wrote earlier in the 13 lines of code to handle that Well, what so these components manage their own state every instance of that counter is a different instance of the component And it manages its own state It knows about its own continuations and the program that I wrote to do that three counter thing is this it's another what Nine lines of code right and I say so in my initialize I've got my multi counter page You know, it's really fancy and so I've got a list of counters I create three new counters and then when I render the HTML, I just say okay go through all the counters and tell them to render themselves and In doing that and I maintain the state so I can use the back button right We saw how I can use the back button and keep the state even once I've used the back button because seaside's handling the Continuations for us and managing the server state and so I Is that interesting to anybody is that cool that I can create that one component? I can reuse it in a completely different context and they all manage their own state and There's no mention of session Anywhere there's no mention of cookies. There's no URL parameters. In fact, it looks kind of like an application Go figure that is basically seaside's point is that instead of writing code that is You know process a request and then Process another request and how does all this stuff fit in together? If I've got workflow through an application, I want to actually see that in the code I want to represent it in the code and the fundamental difference between rails and seaside or basically anything any other web framework any Traditional framework anyone that doesn't use continuations Is in rails you're saying? Give me a link and then it has a URL so now the browser knows what you're well to go to next but in seaside You're saying give me a link and when I click this link execute this block of code This is obviously ruby code, but imagine how cool it would be in ruby to do that second line and you actually can there a couple Continuation-based frameworks. I think Idaho is one. Is that right, right? Iowa Iowa, and then then there was another one. I Don't know that I won't lie. I'm from California.  You have to learn small talk small talk this big massive massive language Java 1.5 has 50 keywords Java 1.4 had 49 keywords. So feature bloat from version to version Ruby 1.8 has 38 keywords Small talk massive beast that it is has six and in fact it really is five It has self super true false and nil and then in modern Implementations of small talk it also has this context and in fact these aren't actually keywords. These are pseudo variables There is not a single keyword in the entire small talk system everything is an object and Everything is done with message sense. This is not particularly exciting to to rubies but when I say that there are no keywords in the system these are pseudo variables that the that the Virtual machine optimizes it optimizes nil optimizes true if you turned off optimizations you could change What nil is or what nil does and what true and and false to and so it's kind of like opening classes in Ruby, but but on a much deeper level and you can call Anything whatever you want because hey, there's no reserve words So small talk has support for littles everything's an object, but certain things are represented better Typically is literal so there are numbers and there are fractions. They have fraction support and there's decimal support this 85 at 26 is a point or a coordinate. I don't know if this is an all small talk, but it's in Faro and Squeak Dollar sign is dollar sign P represents a single character a String is delimited by single quotes and only single quotes And so if you want to use a single quote inside of a string you use Double single quotes and it took me about three minutes to get over that I was like that is really ugly and then it turns out it makes a lot of sense. It's cool hash and parentheses gives you a literal array and Finally, there are symbols provided with with Hash and a name works exactly the same way as symbols in Ruby and finally follow it up with comments, I guess you write comments and they go in double quotes Assignment in small talk is just slightly different than Ruby instead of an equal sign you have a colon and an equal sign and you can assign to local variables or Black-level variables or instance variables And that's pretty much it those are the variables Messages everything in small talk is done via a message send so it looks pretty similar to Ruby Except it doesn't have a dot well It looks similar to Ruby until you get to the third example, which is my favorite part of small talk Maybe which is something that objective C has but clearly not as nice So first three types of messages in small talk one is unary It is a single object receives a message with no arguments and nothing else to it So you see we can call one two three at string and it returns me a new object That is a string representation of the number one two three There are binary ones which are typically for math that are an object an operator and another object and then finally you have keyword methods the Method name in small talk is called the selector and in this case the selector name would be called between And and the two arguments that it takes Are our one and two hundred well of one hundred two hundred I mean it can be anything there right so that the part of the selector is a between colon and the ant Colon and though that message is sent to the object One two three now this is not like Ruby where it's a hash and you can just kind of pass whatever the hell you want to it The message name the selector name is between and it is only between and and it must come in that order And it must have those arguments So you have positional arguments like you have in Ruby when you call a method, but you also have keyword arguments so the Method is not just between one hundred comma two hundred something that's just you know difficult to understand when you've got a few Different things you actually write method names that read out nicely and then last little bit This is a cool bit of small talk syntax is cascading messages I whenever this briefly I send the paragraph message to html and now if I delimit it with a semi colon The next message I send will be sent to html as well And I can mix up any of the messages that I want so you see I'm sending three paragraph messages and finally Horizontal rule so this is a way to very concisely call multiple methods in sequence on a single object Blocks in small talk, of course first-class citizens just like they are in ruby although They are I guess even more first class because you don't have to do any kind of conversion from a lambda to a block You'll notice there's no lambda here anywhere. There's no conversion a block is Square brackets and in ruby I can evaluate a block by calling block dot call in small talk I do it by calling block value and You'll notice in the first example I assigned it to a temporary variable to use so I could call it but then my second example I just call value directly on the block and we see first and second those are your block level arguments that's what gets yielded to the block and I pass those values in by using Value colon so I'm saying this is a block that has two block arguments I want to call it and put one into first and two into second and then it returns the value of those two Yes Yes, absolutely And then blocks get passed into methods, it's very very common just like ruby I've got an array one two three and I pass it a block Collect should look familiar to ruby programmers So some things to know about small talk structure. It's class-based single inheritance Pharaoh and squeak squeak is a VM Pharaoh is a prettier version of squeak Basically could squeak was built to teach kids how to program or to let kids use computers And it turned out it was a pretty good tool for building real applications But people didn't like looking at orange and blue and yellow and big round fuzzy Things and seriously if you look at squeak, it looks like that Pharaoh is a far more professional Implementation, but it also has some really cool tools to it and it and so it has mixed it has traits Which is not a small talk standard thing. It is specific to squeak and Pharaoh There are implementations for some of the other VMs like gemstones so you can write portable code, but porting code from one VM to another is doable, but takes time Methods in small talk. There's no notion of public private or protected you can send a message to any object that you want and small talk programmers had this incredibly clever way of Figuring out how to not send private messages. They have what are called protocols, which is basically a tag It's a group of methods that Literally say like these methods go together So when you want to do this kind of operation on an object deal with this stuff So they create a private protocol and throw everything in there The point being that you can call a private method if you want to if it's in the private protocol small talk does not care, but Fair warning it's private. It may change over time So don't get to use it, but there's no notion of public private or protected no method access But everything is done via message sends you can't Do except for except for assignment you've got you've got three types of operations in small talk You've got method returns. You've got assignment, and you've got message sends and That's it. You can't dig into an object and get its instance variables like you can in Ruby, right? In Ruby a I can call a method to say give me that particular instance variable and I can dig into that But no way to do that in well actually, I'm sure there's a way to you can do everything in small talk You do have attributes you have instance variables, right so the the the instance and The the object structure is basically exactly the same as what you're used to in Ruby You have classes create objects objects have instance variables, right classes are objects And small talk does a very similar thing to Ruby and how it does the whole well Okay, if class is an object, then what is its class and what is the object type of that class and so Similar thing in in small talk So even the control structures are done be a via message sense. This is if and else in Small talk I say some number is that odd if it's true Then you know evaluate this block if it's false evaluate that block same thing happens with Ruby blocks aren't Whatever's in the content of that block is not evaluated until that block is actually called one cool thing You'll notice here is this is a single method with the selector if true it falls, but it takes multiple blocks So I can pass around a block anywhere. I can pass in any object You don't have special syntax like in Ruby for passing a block at the end of a method which Limits you by only being able to pass one block So if you want to have even more callbacks, you know, then you have to use lambda or you have to do all kinds of weird stuff But this if true if false one of the simplest Constructs in any language that is always always always implemented as keywords and as as special language constructs Follows the rules of small talk and then there's an object and there's a method And so if you were to do this in Ruby, this is what it would look like It's very simple under the hood. You've got a class that represents true and a class that represents false and The if true and if false methods both take blocks and Ruby I'm you know, I can use an implicit block So I don't care for the ones that are no ops, but I say on the true class on if true call the block But obviously the false class is not true. So they don't call the block that's passed in right? This is how small talk does True if and else Another difference the final I guess the biggest on different small talk is image-based so instead of having your source files and then Running them inside of an interpreter or having a compiler run and starting up a runtime Small talk is an entirely self-contained environment So the code and the runtime and all the tools to operate on the code live within This same environment.  They like sit and they parse. They're glorified regular expressions with with event handlers, right? Like that's what that's what Just wait so the Objects are living at runtime too and you can actually file them out So when I'm working if I create some objects and I'm just messing around with them They live inside of that image. So when I save my image, they all get serialized under the hood without me having to do anything So when I load my image back up all those objects are still there So small talk is a very very living Organic system. I guess you could say one of the cool things with Ruby is how discoverable it is and how much I can mess around with stuff on small talk because it's image-based and because the objects that are always live at runtime I can do some pretty cool stuff with it so the Environment that that I use and that you'll probably want to use is called pharo You can find it at pharo project that work or pharo dash project that work and this is what it looks like This is your small talk environment laid out so that I have the important tools up there although constrained to Relatively small monitor and not laid out nicely But I have in the top left my code browser in the top right a workspace Which is kind of like IRB, but more awesome test runner to run my unit tests and then Monticello Which is the version control system for pharo. We'll look at all these in detail This is the runtime this is the editor this is the data. This is the refactoring tools. This is this is it When you do not squeak not squeak, right? This is they took squeak and they made it good for for real programmers Yeah, they added a lot of tools like auto completion and stuff like that so out of the box It's a good development environment good developer good environment to develop in So the workspace like I said kind of like IRB. I just type small talk code in here and Then I can evaluate it so I can do stuff in here like this is my little sketch pad right when I want to Mess around with small talk. I do it in the workspace and I can just execute whatever code I want in there So there I was just messing with an array in this case I want to Assign a string to a local variable or a temporary variable and then I want to call the as uppercase method on it to To see what that does so this is you know when you're just playing around with stuff trying to to understand how some of the objects work then You use the shout workspace so it's like IRB in the sense that I can evaluate code in there, but The code that I run in there actually state like any data changes that I make like creating any objects are Stored in local in this workspace so I can reference those in subsequent Subsequent messing around it and playing with code and this is actually a really cool point to start your test driven development You write some code you copy it into Into a test case and then run that and go So it's fun. This is the class browser This gives you access to all the source code in the system and you see that on the left there We have the classes for all of the code. This is the entire VM Everything that implements everything including how message sends are done Including how collections are done all the way up to higher libraries like database access or seaside and eventually my own applications The refactoring tools are in there I'm looking at the protocols here that I mentioned and you see on the right that shows me the methods that belong to that protocol so I'm gonna scroll down to some code that I wrote and You'll notice like here's the class. I've got some buttons here that show me some stuff. I can look up my class hierarchy So I can say I know that I've got this RWC counter. It inherits from WA component There's the entire class hierarchy and on the right. I've got the methods that are defined in each level of the class hierarchy So at this point, I've got an insane level of Discoverability here. I can look at the variables that I have I just click in the variables and I see where they're referenced to So I've got a count variable that is referenced inside of render content on And it's also referenced and initialized and then increment and decrement and those I can basically keep following the chain And I say where is increment called from whereas render content all come from and I can start to explore all my code and really find You know find what I'm looking for or a lot of stuff that I'm not looking for I Can look up all the different implementations of a method name So this is every single implementation of that method render content on in the whole system So if I want to see how other classes implement this method, I can do it and then finally We're looking up inheritance Is that what that says I totally lost Track of what's going on right now. I Don't think that's that cool. So I don't know why it's there But I can look and I can see everywhere that render content on is actually called from So I've defined this method one of the cool things is one of the questions is now that I've got this method Where is it actually called from and here is every single spot in the entire VM? Where the method render content on is called now I can actually scope all these down I can say only look within this one package so I want to know where this method is called within this set of classes and that allows me to basically track down all the areas where Where where my method is called and what might be affected if I make changes? So that's a class browser it is You'll notice in the bottom pane here. That's actually where you edit your code That's the whole code editor for small talk when you click on a method It shows the method in the code you don't have really big-ass long source files And you can't get big-ass long source files. It's individual methods one at a time I'm going really fast. I might have missed it when I look down for just a second, but Do you have that's not a question, but Ken can can pharaoh show me where classes are reopened and methods are redefined in order So I could see for example all the monkey patching that may have gone on a particular Monkey patching as it exists in ruby is not quite the same in pharaoh What you have are okay? Well one cool thing is if I look at I was gonna stay away from line coving because as much as I like it I always screw it up one thing you'll notice here render content on has a little up arrow That means it's overriding a method from the superclass There's a method in somewhere up the hierarchy called render content on we're overriding it Similar thing happens if I go up the hierarchy and look at it I look at render content on it'll say that some class overrides it I well Sort of and I haven't used mixings in it So I don't know the answer to that so much what I do know is I'm trying to find if If I can find a good example of Wait, I have to pick the actual class so Okay, I don't have an example that I can think of off the top of my head that has it But in these protocols you see running and testing and private You can do what are called Extension protocols so I will look at this in Monticello, which is the version control system But basically I can say create these methods on This class so I actually can create new methods on one of the existing classes And when I look at it in the class browser It's going to show up in a special protocol that's going to have an asterisk and then the name of the package that it was Defined in so if I wanted to make you know my special RubyConf methods on string I Define them inside of string under the special package under under that special protocol now when I add it to Monticello It goes into version control along with it so I can pass that along right so any extensions that I make to the core system Oh, I have 14% battery Any extensions I make to the core system then Get shared, huh? I'm out of time Okay, can I go for a few minutes? Okay, we'll go to the battery guys Because there's some cool stuff I'm gonna show you some of the tools I know you should sell like benefits and not features But I think the features are cool enough here that you will look at them and figure out benefits for you This one's fun method finder. How do you upcase a string in cease in small talk? I don't know, but I know that I want to start with lowercase ASDF and end with the uppercase ASDF Okay, and then it tells me where it is. Oh It's string as uppercase. Oh Then I can browse it cool. Yeah, I know what blow your mind. Oh Oh God this is so much fun Refactor method that one line. I want to extract to something so I will just select it I will extract method. I will call it something that makes sense like render heading hit. Okay Small talk says is this what you want to do? I Say yes, that looks about right Okay, so I'll accept it Right and so now we see in my render content on it to find this new method render heading on extracted the source out We see that over on the right side. I can extract the rest of the source out So we'll just create a new method here For the actual counters. I like narrating my videos better than trying to do it live and then for my final Automated trick Let's start showing you the methods that I have okay I don't want to show this now because I want to skip past the refactoring But I think what I do next is I create a superclass of my component So I basically insert a new class to it And then I take the two methods that I had on that subclass and I push them up to the base class So in a matter of two minutes Going slowly because I want to demo it I am able to take some source code extract methods insert a new superclass and move methods around to the classes In which they belong refactoring is fun people don't do it in ruby because refactoring tools suck small talk has them I forgot which one this is oh This is the object inspector in which case I have an object and I can actually look at it And I can start to look at what's inside of it. So I have an array It's got some elements. I've got this little Interpreter down there that uses where self is the context of the object that I inspected So now I can just start to run methods on that object. I can click around through it I can look at it. Like I said very discoverable very discoverable. You can experiment a lot. It's really cool This is Monticello On the right are basically change sets. It's a completely different thing that what you're used to small talk doesn't work with get but Has its own advantages. I can look up the change that I can see all the code that's in there I can pull in little bits. I can merge it into my system. I can replace parts of my system with it Very very powerful. So on to seaside, which will burn through like I said programmatic HTML I have this one method where I write a bunch of small talk code and it creates this very ugly form added Form and you'll notice. I've got callbacks on there that say that when This basically the callback on text input says that when we submit the form take the value of Whatever's in that field and store it and call the method email which stores it in a local variable and seaside gives you kind of a Shortcut for that saying you know on and of and so that that's a shortcut for that now when I submit the form I have the data for the user. I want to validate it. I want to save it to the gateway I have a sign up by so again This is Specifying the code that you want to happen in the place that it should happen and seaside just sort of takes care of the Rest I have So why is this great? Well, it's small talk semantics. I can actually I'm writing in small talk, which is fun to do it produces a hundred percent valid XHTML I don't have to deal with square brackets or angle brackets and stuff like that. It's just done. It's refactorable That's the best part. I can take three lines of code. I can extract it. That's awesome. Why does it suck? Well, what happens here HTML personally? I don't care, but some HTML designers are really big on being able to edit their own HTML But you know one of the seaside's opinion is we generate the HTML you do the CSS Hey, wait, we have lunch, right? So I'm just gonna keep talking for a little while you guys feel free to go grab lunch Spoiler alert. This is the best part of the whole talk In case it's not in case it's not obvious This is Alexander Graham Bell on the left and there is Steve Jobs on the right saying holy cow My iPhone is so cool. I can actually receive telephone calls from Alexander Graham Bell So call and answer two methods provided by seaside on components They transfer call transfers control to a different component and answer returns control back to the calling component If it wants to are you hooking me up with power, Mike? Thank you We're See, I knew this was so thanks for scheduling it during lunch this is Okay, so What we have here is render content on again We're just generating the HTML and you'll notice in the first on the third line I have an anchor and my callback now instead of setting a variable it says call this other component and So I'm saying instantiate a new instance of this component and then call it and then Somewhere along the way doing that is going to return a value back to me that I then assign in this variable Well, what happens when I do that? I've got a second component the one the RWC value prompter that Just has a form it says enter a value and then in my callback I say answer with this value So what's going on here is when I click on the link like so I render the component the first time it'll show a bunch of HTML When I click on a link it'll transfer control to the other component It'll let that component do whatever it wants which could mean transferring control to another component And it could go down on and on and on until eventually this component says I'm done. Here's the value. Here's the response So the second component takes the callback once somebody submits the value it answers it back now What does this look like? Well, I click enter your value a new component comes on to the screen it returns it I move on to the second one Get the value return it and then I see the sum so if you look at the code again for that, right? I said get the first you know Get get the value of the first first number get the second one and then some them But the actual getting the value that entire control flow is not done in this component It just says transfer that off to another component. So this is insanely insanely powerful Now the closest thing seaside it doesn't really It doesn't think that NBC is all that it's cracked up to be Sometimes your view logic actually goes along with the data that it works on and so maybe you should put those two things together Well, the closest thing you get to controllers is this WA task Which basically allows you to define a flow control and then yield control to other components But I can write the actual control in a way that makes sense and represents the control and then let those components deal with the whole rendering the HTML and And getting the values So I can streamline All that code to this I've got a new method go which is what's on WA task and that whole R&C value requester or whatever that is actually something that I made up for the purposes of this example So you could see how answer works, but because that's such a common thing. It's built in to Seeside as self-request. So when I call self-request that actually Creates a new component. It calls it. It lets that component do its thing and then it returns the value back So once I've gotten the first number and I've gotten the second number now I can create another view that actually sums those together and I pass control off to that so in this way I'm able to Write code that represents the control flow through my application via my tasks and then delegate the actual user Interaction part to components that manage their own state and that are able to return values to the to the task and keep going So that looks the same Basically, I enter a number because that's what was requested. I enter another number and then I get a sum Yeah, so significantly shortened code So how do you use this with rails? Well This panda loves using rails for crud because rails is awesome at crud But you know whenever he does complex configurable workflows.   Well, you can integrate through the database that is like C side can actually Connect out to a database and it can you know use all the data in there And you can fetch it just like you can in a rails app and that works just fine But now you've got this interface that you didn't really define between the two applications You're working on a sort of fixed data structure And it's kind of brittle that when I make changes to that data structure I have to make sure that the the other side of it works and Small talk has much better ways of dealing with persistence anyway, so you don't really want to You don't want to go through the database So you can also do C side as a service Which you can do Jason and XML APIs or you can in your rails app use mechanized to go through and kind of click through I would have loved to have had a gem that just handles all this for you But frankly as I've been using this in my own work I've been coming up with different ways of doing it So it's still still sort of figuring that out But it works really well to what what I do is I make my initial request to see side I store the entire response document in the database and then I use mechanized to parse out the URLs I kind of transform those URLs on the rails side so that when I click a URL on the rails side it Rails goes and figures out which URL that was on C side. It makes the request and you know comes back So I basically I can delegate all my complex workflow stuff over to C side Maglev I don't know if you guys are familiar with this maglev is a project from gemstone that lets you run small talk Or let's you run Ruby on their VM and I was talking to Monty a little bit And I said it would be really cool if I could run one maglev instance and one Gemstone instance and basically run C side on gemstone maglev or ruby and rails on maglev And then have them share objects back and forth and apparently that's entirely possible at some point because what what maglev And gemstone do is let you run multiple VMs, and they just transparently share objects, right? And so what I could do if this happens when this happens and I'm pushing him for it is I can define my Validations in rails and then I can use C side for my complex workflows and because those objects are just transferred from one VM to another Automatically without me having to do anything that means my C side code actually uses the validations from rails That is a holy shit if we can make that happen that would be so Freaking cool to to be able to do this and it's going to totally change the way you develop software So hopefully this happens if you want to learn more about this stuff Faro project org is where you learn As where you get the VM C side ST is the C side web application framework. There's some free books for example You can download a free PDF Book C side ST is free online. You can also pay like $12 for a PDF Squeak source is the open source kind of like github for small talk Although it's really ugly and not as efficient. So it's more like sourceboards than as github Asked without I can think of so thank you guys for staying into your lunch break. I'll leave the resources up You know any questions? Any? Yeah? Yes Okay, so the question is in Faro. Can you add methods to an instance of an object? So like singleton methods in Ruby. I don't know Yes, it has regular expressions. There are a few different libraries. They are It's not quite as clean as As rubies I guess one of things Ruby basically if you looked at Ruby's history you could say that Ruby inherits from small talk and includes pearl, right? And so you've got them really nice pearl regular expressions in Ruby You do have regular expressions in small talk, but just not as nice Other questions Yeah, I haven't I haven't had in particular interest in building things other than seaside really So I do know that you can create OS specific binaries that kind of bundle the VM in there and they can hook into windowing systems I haven't done that. So I don't know I do know that there's a guy that Used squeak to write an iPhone app So and it was on the app store, and I'm not entirely sure how that worked given given their restrictions, but those restrictions are gone so you know All due respect to Evan who's not here so I can say this he just showed you objective C Hey, if you want to code Ruby or small talk on the iPhone I think that's probably gonna be a much more desirable route to go Yes Monticello is the version control system and It basically stores the change that's in more of a binary form then then then just text files But it has little packages that you can ship around and that you can push out to public Monticello servers And people can browse and people load it in so you don't use get you don't use a version You don't use CVS. You don't do any of that. It's all in the environment. Monticello is your version control system Is it easy is Monticello easy? Yeah, yeah, there's a good documentation for it and the only Question that that you ever have really is do I want to load these changes in and replace some of the code that exists there Or do I want to try to merge it in but in terms of using it? I like to save my own changes out and Create a nice version history totally doable I don't know if you rewrite history like you do and get but But it's more like you can cherry-pick versions and so I can say give me the latest version Which will give me everything up to that or I can say give me that latest version But ignore everything else and then Monticello will complain if the system is not capable of supporting it Because the new code change includes a call to a certain class or a method that doesn't exist So it will warn you for some of the stuff like that This it kind of takes a while to wrap your head around some of this stuff But you know if you take a week to go through the ferro by example book or the seaside book you pick up a lot of stuff And it should be pretty exciting. Yeah Sorry, can you speak up? How do you handle deployments is the question deployments in seaside are completely different than anything You've ever done before in rails and in fact there is no Single model that works for every application Basically the way you've designed your application has significant influence on how you deploy it so some things like Dabble DB which is is which is a cool tool built by obvi Bryant the dude who wrote seaside Their model is to have one image per customer because the customer data does not relate to each other at all People are just creating their own databases online Maybe sharing views with other people But if I want to get data for a particular customer I go to a single image now an image once you've stripped out all The development tools is roughly three megabytes plus whatever, you know massive data the soccer mom put in there You know making making her her call list over the weekend, so You know the point is hopefully you Are charging enough that you can afford to store three to five megabytes worth of data on your servers per customer And then they write some scripts basically to bring up the image into a VM process on the fly Depending on when the requests come in Other typically what you do is you have multiple multiple images running and If you want to share data between them you use something like an object database like magma or goods Which are both some of the persistence options all the persistent stuff is laid out in the seaside book By the way, and then you could of course use gemstone which kind of handles all that for you Transparently so the key point though is that you have to have a load balancer that does sticky sessions on there So that requests coming in that are part of the same session go to the same image because they don't share data unless you configure them to Yeah, you can absolutely handle many users in a VM. It's just kind of a matter or in a single image It's just a matter of how you want to to lay that stuff out I guess one of the sort of frustrating things is like how do you do persistence in this and like some questions of how Do I do this well? You'll Google it and there will be a blog that says oh, yeah persisting your entire object structure Is these nine lines of code and so you're like well How come there's nothing like active record that lets me just save stuff It's like literally because you can write your whole persistence mechanism for your entire for your entire data set in nine lines of small talk and the way you structure and design your app is going to have a significant effect on how you choose to persist it so There aren't really I mean There's some off-the-shelf solutions that that let you like goods and magma that are object databases that do this stuff for you But you know it is also nine lines of code to write it completely customized to your applications needs Mike, did you have a question?  You email Yeah You guys if you haven't seen maglev examples yet first of all maglev is on github the whole thing is not on there But you can install maglev and you can use it and It allows you to I don't have it configured on my machine because this is new and I was trying to set it up for this I had problems because I was using RVM instead of the I would recommend not using RVM for maglev, but You load up to IRB processes You define a class or an object in one of them and then it is available to you in the other one So they're two completely separate ruby VMs running, but they're sharing data back and forth So the question is can we do that between a small talk specific VM running seaside and a rail specific one? or maglev one running Ruby and the question or what you need to do is Email this dude Okay, who just emailed me. How about that? Right, so if you guys can see this can you see that I'll just I don't want to tweet it, but I mean he is on Twitter too If you email this guy and say so Pat Maddox was telling us about seaside And he said you can make it run Ruby objects next to a Ruby VM next to a maglev VM And we could just share our objects back and forth. When is it going to happen? I? Don't know. Maybe it goes bumped up on on the feature list Presumably they want to get it working rails in production and stuff first But this is absolutely one of one of the things that that they're considering right now, and he's on a BJ. Do you know his Twitter name? He's Monty Williams on Twitter too Right, so he's basically the guy running maglev at this point another question Right Right absolutely Totally so Comment is seaside is an object database It doesn't really fit into the whole rails active record rdbms mentality I do know from conversations with Monty that having database adapters that can at least go out to postgres in my sequel is A very high priority for maglev in fact it probably works in some in some state at this point So your so your maglev so your rails applications running on maglev can continue to run unmodified I Say screw the relational database. It's not interesting.  It's phenomenal for reporting But when I want to store an object structure, and I want to store You know I want to store my application state It's not particularly great at it And it's only until you start messing around with objects and they just save automatically for you And you don't even have to think about you know them going to a sequel database that you go Oh, hey, this is a really really cool to write way to write software you deal with objects You write application code it all kind of just works, and then you absolutely write some Write some listeners for when stuff gets saved so you can write it out to reporting database and do your querying and reporting from that so Yeah, a big priority to have rails and active record working on maglev I say that that is not nearly as exciting as being able to totally change the way we white We write rails applications. Yeah follow Database people Well, they do in like financial systems right small talk runs like 60 to 70 percent of of big financial systems on The New York Stock Exchange and various different trading firms So, you know and that's where that's where Matt or that's where gemstone makes their money right now It's like those big enterprise applications that have complex domain models Complex business logic and then need to be able to share that across across many many servers. So In less my okay. Yeah So I was okay So the question is what kind of performance you see with this and especially I would say with the architecture that I came up with Which is have your act or have your action controller make requests to see side and then do some stuff with it. I Prepared a lovely benchmark that would prove demonstrably that it added 10% of overhead Maybe to make a request out to see side and do it and then when I ran the benchmark it totally pegged my VM so Turns out that that you know that grand idea of this was was not accurate But that was running with the VM in development mode So it has all those tools and so like the VM at the image with all the tools is like 45 megabytes And when you strip out all the stuff to only what you need to run see side in your application goes down to 3 megabytes so the Basically, you know me running running performance metrics benchmarking against the development environment was Like just didn't work So far, you know, I'm the places it won't when I've used it It's still just been in development. It's only applications that are in development there are There are applications in the wild that are using seaside successfully and I think they're under like seaside success stories and So you'll look at here. I don't have any Exact benchmarks. I do know that there are a bunch of companies that are using it for production stuff And if you look for for benchmarks, then then you'll get it seaside itself Head-to-head against rails is faster than rails because small talk is just a lot faster than rails It or then then Ruby is like the the VM has been tuned for 20 years and everything while it's a dynamic language Everything gets compiled down. So it's really really fast There is memory overhead with the continuations in In seaside, but they are not particularly slow if you do like a hella world in seaside versus rails hella world in seaside smokes it I've done that one and I Guess the other aspect is you know if I'm gonna treat seaside as a service and call out to it and use mechanized with it That follows the same rules as as any other kind of software as a service, right? I know like Amazon and and Kobe's team both both like write a ton of services and then have a rails app hit those so it's a Proven architecture right it works But you know if you have one service sitting on the other side of the country as as the client Then you're gonna be completely hopes right so you need low latency there Okay, I'm my voice is my throat is starting to hurt So unless I have any you know anybody is like dying to know something that that they that we can't do over email or Twitter You know after I get water Think I'll call it a lunch hour


Good afternoon data science community and a welcome back to Stanford University. We're here with the cubes live coverage all day long at women data science Worldwide annual summit. My name is Savannah Peterson.  My next two guests are from ASML Bing and Chen. Thank you so much for being on the show. Welcome. Thank you. Thank you. It's very nice to have us here. Yes. Are you enjoying yourself so far at the show? Of course. Yeah, it's it's you mentioned you've been here before the pandemic. Now things are scaling. Does it feel like there's more and more women in data science? Yeah, I'm so glad to see the community is growing so fast. Back to a few years ago, I'm one of the maybe 200 ish ambassadors. And now we know that there are over 1000 ambassadors. Oh my goodness, 1000 ambassadors, 150,000 people in the community. Super impressive. Really glad to have you here. You both have very interesting jobs. And and ASML is more than just a semiconductor company, more than just a silicon company. So I am going to have you tell us a little bit about those. Bing, let's start with you. Okay. So in ASML that we make the most complex machines to print chips. So for most people, we think that, you know, most like just hardware. But actually, we also have a lot of software engineers to work behind this. And so for me, specifically, I'm working on the image processing part of of the production line. So we do a detect. We do sorry inspection and metrology. So for inspection, basically means that after we get the chips that we want to. Find the anomalies on the chips so that we can quantify this can quantify this chip. Sorry. No, you're doing great. It's essentially quality assurance. It's QA for photolithography and the actual making sure that everything that goes into these machines is going to do what we expect it to do. Exactly. And for metrology also, so they are basically taking measurements of the printed patterns. So if the measurements are within the given range of the specifications, we know that these patterns are printed well. They will do the chip actually will work as we designed. But if without if it is out of the range, obviously we need to rework this chip. So for both inspection and metrology, actually we are doing the quality assurance. Yes. It's going to be a tough job. I mean, we're talking about things on the micron layer too. We're talking about very, very tiny nuance and detail here. Exactly. So we are at the resolution of nanometers. Amazing. Yes. Wow. That's super cool. And Chen, you also have a very exciting job. Yeah. So I work with being in the office. So my job is slightly different. I work on the modeling side inside computational lithography. So you know that our machine keeps pushing the physics boundary and engineering boundary in every generation of our new machines. So the computational simulation part is really important. So what I'm working on is that I'm trying to build highly accurate model to a sub-nanometer level to predict how the optical, physical chemical and how the physical chemical process is happening on the wafer at this highly accuracy. How do we do that? It's actually re-leveraging a large amount of, I should say, exponentially growing amount of data actually through metrology and inspection to build highly accurate models. And this large amount of data actually enables us to unleash the power of machine learning or even deep learning and our production lines. You would have to. Otherwise, you couldn't process all that data to be able to... Yeah. I mean, we can't see what you're doing.  It's so exciting. So I'm curious. This whole show is a real intersection of academia, of industry, of curiosity even. There's folks here just kind of coming to check things out. What are some of the career paths in academia for data science? I'll start with you, Chen, and then I'll bring it to you. Yeah. Interestingly, I have both a career in academia and I shifted to industry. Perfect person to ask. So I'm a physics major in undergrad and I took my physics PhD in atomic molecular and optical physics. And then I did one year postdoc in the Lawrence Berkeley lab just up north, 60 miles and so on. So after that, I realized that I really want my research, my work, and my skill sets to be applicable to contribute to real world impacts. So that a few friends referred me to SML. After I entered SML my job in a research division in SML and now in production engineering division in SML, I really find that SML is the best place because it combines all of my academia background postdoc experiences as well as my programming skills, physics skills and so on. Combines everything into contributing to the most challenging machine in the world. At the meantime, I met many brilliant colleagues from multidisciplinary, for example, being an electrical engineer background and many of my colleagues are physics, chemistry, mathematics and mechanical engineer and so on. So it's really, I should say that people who are having academia, doing studies, researches in academia, they will have a very huge amount of opportunity in industry. Nowadays, pretty much every industry requires multidisciplinary contributions from all the backgrounds. I would say that if you're willing to enter a new interest in industry, willing to learn, there will be tons of opportunities from my experiences. It's definitely been a theme of the show, is this intersectionality, multiple disciplinary, cross-team collaboration. It sounds like you were a dream fit for ASML and like you two are dream teammates in general. What sort of paths have you noticed, Bing? My background is a little bit different from Chen's. Even at the beginning of my undergraduate study, I started majoring in image processing. So even starting from then, I have started dealing with massive data. Later on, I also got my PhD in image processing and statistical data analysis. Just a little bit of education sitting at this table with me right now. I'm feeling uneducated by a mile and I couldn't be more proud. It's great. I love it. It's an honor. And also after I finished my degrees, I worked in the university for quite some years. At that time, I actually was doing clinical imaging studies. So I was doing cancer treatment or tracking for the medical school in University of Michigan. Through all these years in the academic, I'm vigorously trained with all the theoretical background. Also, in academia, most of the time, we are trying to develop a novel algorithm and models to get a specific metric optimized. That's the goal, to get novel technologies. So that needs a lot of theoretical background. And that's very useful when I switched my career from academia to industry. Because I say in a company, most of the time, we are in contact with real world problems. So the data are messier, let's say messier. And the problems are usually at the beginning, less well defined as in academic background. That's a really good point you just made. You're saying that when you're in academia, there's a lot more research that's going to be led up to that moment or things coming together to intersect. So it's almost more scripted versus when you're in an industry business solution. You're kind of just pulling together parts off the shelf and trying to make it up as you go and build what you need to build. So with the data that you have to make the decisions how to preprocess this data, how to clean data and how to formulate your problem to a model or to a real well defined problem. So with the training and all the experiences you get in academia, that will have you great to start and to get the formulation of the problem in the most efficient time. So that's the advantage that we had transferring from academia to industry. Well, I think that's awesome. There's clearly an overlap between academia and industry. I think also we're at a really interesting time just in the state of AI, ML, a lot of what's happening right now. We're going to have new folks entering the space. What you both just said is your background and whatever your background is, paired with some education in the space means anything's possible. You could be working on really interesting projects and that background, that interdisciplinary background could be really compelling. Are there any very specific, and you've both kind of touched on this a little bit but I'm curious if there's some that come to mind. Are there any particular challenges in the semiconductor industry that are uniquely solved by data science or technology today that maybe would have been significantly harder to do in the past before we were at where we're at? Ah, so what you mean is that with data science technologies from data science are inspired by data science methods, we can solve some problem better. Yes, and specifically in semiconductors. Yeah, definitely. So nowadays, many of our data are coming from as metrology inspection and many of our data are coming from the machine-locked data. So those data are massive. So before maybe even five years ago, we can only do down-sampling of those data to extract very limited amount of information to build positive empirical models with a few parameters. So that we are, I should say, back to that time, we wasted a lot of data simply due to the computational power not sufficient or how the modeling model is too complicated to finish the simulation we see in a production needed time-free. So that means we are limited back to that time. Nowadays, we can leverage distributed computing. We can leverage GPU technologies and so on, these hardware computing powers as well as many data science methods which were not well-known before. However, now it's getting much more popular. For example, cluster technologies, image processing technologies, video processing, audio processing, and so on. So all these, I should say, data science make all these technology much easier, accessible, even to industrial applications and for both ourselves and our customers to be more open to try these new technologies and generate more values for them and for ourselves, yeah. So pretty much every aspect of it to send a degree. Yeah, for us, let's say, before we do metrology and inspection that the WIFO will be scanned using an electron beam. Yeah. And okay, I talked about that these days all the resolution is the nanometer scale, so the images are very, very targeted and imagine with the electron beams that the noise of the images, they are much higher than what we deserve to be. Yeah. So the first step is that we need to actually pre-process these images to have better quality and now with current data science technologies we can use all the data that we have like Chen mentioned, we don't have to reduce a lot of the data or done sampling. We can use all of them so we can get the best benefit of it. Yeah. Yeah. It's all about making the world better and making our jobs easier. Yeah, let me add one more thing. Please. By all means. I'm here to learn. So I have a very recent example in my work although I couldn't disclose the details but I use one example. So maybe five years ago our computational capability can only afford a few hundred training examples and now we can easily afford up to million training examples. That means our model's competency back that time should be limited, right? Yeah. But now we can leverage deep learning models and our productions because the growing computational power and growing data amount. I'm really glad you brought that up because what we're able to do now before even four years ago, ten years ago is orders and orders of magnitude more in terms of volume and speed. So I think that's a really good point.  We're here celebrating International Women's Day. We are all passionate women in our space. You both do a little bit of work there, don't you, for the working group? So tell me a little bit about how you're empowering women in our field. Chen, I'll start with you. Yeah. So both of us are inside a community called SML Women in Silicon Valley and it's part of the SML Women Bigger Community. So we established this community back to the year 2015 and I'm the third chairman and being worked with very closely contributing to the community. So the community's mission is to build a supportive environment for people to learn, share and lead. And these WIS, the WIS organization is definitely one of our channels that we believe resources from WIS can be accessible to our members for their career growth, for their technology, for the pathways and career policies and so on, improve all of them. That's why we come here and we not only introduce ourselves but meet the community who are either academia or other industries to join the bigger community and use that as our members' growing resources. I love that.  Exactly. And also like Chen mentioned that we came here and this is my first time at WIS and I'm so excited to okay, this morning listen to all the talks and meet all the other peers, let's say. And this community I think that it will do huge contributions to promote women's in data science and we'll see, yeah, we're looking forward to all the brighter futures. I was just going to say the future is bright. One more thing I want to add is on the inside there are many, many different departments. So mechanical engineering, electrical engineering, software engineering and so on. Many of our colleagues does not even know how their work already involves a lot of data science elements. So that's why we want to bring the knowledge, observations, learning from this conference to our community members, our colleagues to let them know, look, your work is how they're leveraging data science already. How about joining this community to learn more? Yeah. Oh, I love that. Well, it sounds like everyone's invited into your community. On that note, a couple of last questions to close us out. For women who are just about to embark on their journey or looking at you, thinking how cool your job sounds, what's your advice? Bing, I'll start with you. What's your advice to a young woman in data science right now? Yeah. Or are you thinking about it? Yeah, I think that, oh, okay, the first thing is that when a young lady is trying to get into this field of data science, I'm sure that she has the passion about it. So with passion, that's the insight driving for you to get to learn new skills to get more, to broaden your view. And so I'm thinking at the beginning if you haven't been into this field yet, so just to explore your area, you know that you can talk to all the women. I want to specifically say women, all the data science that you, scientists that you know, and talk to know how their path was, how their professional path was. So that will give you some insights that you can reach your goal maybe faster. Beautiful, beautifully said. What's your advice, Chen? Yeah, so one thing I want to emphasize, not specifically for women who want to enter data science career, it's actually for every woman, is that how to never be afraid, be bold and be brief. Think about what we can do if we are not afraid. Once we feel safer, how to leverage our potentials, how to maximize our potentials best. Beautifully said, ladies. Two more questions. What is your advice for someone who is looking to be an ally to women like us? They've got a young woman or any age woman in their life who's trying to fight the good fight and get in a career in STEM or in data science. What do you think, Chen? What would be your advice? The question is about if someone wants to be ally, how they can contribute. Let me use one example I like most. I share with everybody. One of our executive sponsors is actually a male executive in our company. And he is, I should say, his Christmas and he's the best male ally I've ever had in my entire academic or plus industry career. So what I observe is that he is a champion, sponsor and supporter and mentor of all the female colleagues in our company and even globally. So I think to be an ally, you can feel free to take all these roles and what else? How to be brief enough to stand up to help women to advocate. Well said. Any advice you'd like to add to that, Bing? I think that she said too well. That was very well said. So I'll just say that I mean for women that already in this engineering or data science, specific data science world, that we need to be more open to the, let's say, newcomers. Because for them it's a little bit intimate at the beginning, right? Of course it's intimidating. I was intimidated even though they're coming in here today because you're also smart. Yeah, totally. It's a male-dominated field. Totally. We have to donate. But we can also see that there are so many women engineers, women data scientists already there and they have done all the work. They have been through the path. And yeah, I'm thinking just when we are already in this field we can get connected with newcomers and help. Yeah, always be willing to bring that person up and water level rises with those all together. I think that's a really great note.  Yeah, I would say that when I was working in medical school and my advisor and he's my mentor. He's always very helpful for me that his name is Chuck Meyer. Well, thank you. Thank you, Chuck. And what about you? Anyone who's helped you on your journey? So I had quite a few mentors inside SML. Some of them are female role models. Yes. And some of them are male allies. And some of them are peers. From all these mentors I see has a genuine support attitude and they really want me to success. So they guide me and share me with many things. And later I become a mentor myself and mentoring a young lady in my company. So I really think that this type of... I asked one of my mentors, why do you want to mentor me since you are already very, very high level? He said I want you to mentor somebody else when you grow. So I want to say that to everybody that you are either in a growing journey or you are already well established or you are very green, very young in this field. Keep that mentality in mind. This community will grow. I love that.  It's why we invest the time being in China. It was so nice to have you here. Thank you for the work you're doing at SML and within the WIDS community. Just brilliant. I'm inspired and I hope you're all inspired wherever you're tuning in. Live to the Cube's coverage here at Stanford University. My name is Savannah Peterson. You're watching The Cube, the leading network for empowering females in tech.


Thank you very much. Thank you all very much. And on core, thank you. I know that secretaries Baldritch and Baker have briefed you on trade and tax policies, and I'm grateful for this opportunity to speak with you personally. Grassroots America will be playing a decisive role in the next few weeks as Congress decides some issues that are at the heart of our country's security and economic well-being. Interactive support will make a difference, and believe me, is really appreciated here. It reminds me a little bit of the story of the man that took his young son-in-law out and was going to introduce him to golf, and told him all that he had to do and teed up the ball, and the kid took a swing, and he missed the golf ball entirely, but hit a ants nest there and into the air, and so lined up and took a crack at it, and again, had another gouge out of the ants' nest, and now there were ants flying all the way through the air, and as he lined up for the third try, two ants peeked out of the crater that he left, and one of them said, if we want to survive this, we better get on the ball. Well, the day I'm happy to be with people who are on the ball and ready for action. Over these last five and a half years, many of us in this room have worked together on a number of issues, and several here are continuing that work by running for Congress, the State House, or other office, and I salute those candidates who are with us here today, and a special word of welcome to Patricia Donovan, Ron Pierce, Pat Halpern, Robert Reica, and Donald Walsh, because these activists recently re-registered and joined our Republican ranks. Being a former Democrat myself, I know how difficult it is, and we're proud to have you all with us. I have to tell you that I had started working for the party before I got around to joining it, and one night, 1962 state campaign in California, I was speaking at a fundraiser and a woman stood up in the middle of the audience and asked me if I'd re-registered, and I said, no, but I'm going to. She said, I'm a registrar. She walked right down the middle aisle, put the paper up, and I signed up and then said, now where was I? Well, the economic vitality that's so apparent in our country today is not the product of blind luck. It's the result of good policies, and policies that many of you help shepherd through the system. And now it's time to take the next step, and it's a big one. We have, as you've been told already, thanks to the leadership of Bob Packwood and others in the United States Senate, a window of opportunity to pass one of the greatest tax reform packages in all our history. There will only be two, not 15, individual tax rates under the proposal, 15 and 27%. And the vast majority of Americans will pay at the lower rate, and most Americans will enjoy a reduction of their total tax obligation. And those toward the bottom end of the economic ladder will be in the third tax bracket, zero. We have it within our power if we're forceful in purpose to bring down the rates and close many of the loopholes, which have made our tax structure unfair, overcomplicated, and to drag on our economy. We can put in place a tax program that will take America into the 21st century and with all the gusto and enthusiasm with which we entered the 20th century. Not that I was around back then. Seriously, though, we must be vigilant to the power of the special interests. And I hope you'll put the word out that it's time to get on the tax reform bandwagon. Anybody waiting for special accommodations is going to be left behind. Whether America takes this giant step forward depends on grassroots Americans like yourselves combating the special interests. I hope I can count on you to put tax reform on your front burner. You just made my day. Well, the order of the day is get with the program. And good economics will usher as to a better future. But we must also ensure that when America or when tomorrow comes, America is secure and firm in its commitment to those principles that we as a free people believe in. Shortly, the House of Representatives will be deciding if the United States is to help those Nicaraguans who are fighting for democracy in their native land. Providing this assistance is both a moral imperative and the course of action most consistent with our own security interests. What we do to help the Nicaraguan freedom fighters is every bit as moral and just as anything, this nation or any other nation has done to aid those struggling for their liberty and independence. As Americans, we're the arsenal for democracy. The keepers of the flame that Jefferson wrote about when he penned these words, the flames kindled on the 4th of July, 1776, have spread over too much of the globe to be extinguished by the feeble engines of despotism. But expressions of solidarity aren't enough. Albert Camus, a leader in the French underground during the Nazi occupation, wrote during the war, contrary to what we sometimes used to think, the spirit is of no avail against the sword, but that the spirit together with the sword will always win out over the sword alone. Those who fight for freedom are our brothers and sisters and they deserve more from the United States than words. With our adversary arming totalitarian forces to the teeth, we must have the courage to give those who share our ideals, especially those in this hemisphere, what they need to defend themselves and to win the day. In recent years, we've witnessed in the Americas the greatest expansion of democracy in this century. Today, 90% of the people of the Western Hemisphere, North, South and Central America live in countries that are democracies or are in transition to democracy. We cannot stand by and permit a Soviet beachhead, which will be used to undermine this process, to be consolidated on the mainland of the Western Hemisphere. The zeal of the communist regime and monogua for internal repression is matched only by its commitment to subvert neighboring democracies and to spread terror and chaos far and near. The Nicaraguan government has provided weapons, logistical support and training for communist revolutionary movements that are plaguing Latin America. And the Palestinian Liberation Organization, Italy's Red Brigade, the Bader-Meinhof gang, and agents of Colonel Gaddafi, all are in and out of monogua all the time and there is a close connection. Now, is this a threat to the rest of Central and South America? Yes. Is this a threat ultimately to the United States? Yes. The strategy of the Sandinistas should now be clear to everyone. It's a strategy of delay, dragging out negotiations, never taking a serious position so they can wipe out their opposition while Congress waits to see if a peace treaty is around the corner. Well, if we continue to delay, all we're doing is playing into the hands of the Nicaraguan communists. We must stop falling victim to stall tactics. We cannot, we must not downplay the threat to our country or to freedom in the hemisphere. To deny aid to the Contras is a mandate for inaction which could well result in the creation of Libya on our own doorstep. Let's not kid ourselves if the opponents of aid have their way. Preventing us from assisting our friends, Central America could soon become a divided war-torn region with Nicaragua a refuge and safe haven for terrorism. If this happens, the American people will know who to blame. As president of the United States, my primary job is not placing blame, it's the security of this country. Deserting the Nicaraguan freedom fighters would be a national security disaster for the United States. And together we can see this never happens. Our commitment to overcoming the challenges to our security in Central America and elsewhere, our efforts to reform our tax system and keep our economy strong and growing, are not for us, therefore those Americans who come after us. And I've often said that America's greatest days lie ahead and that's what we're striving to ensure. Just a few days ago, I've been on a number of campuses and in high schools. When I look at today's younger Americans, I know that the 21st century is going to be in good hands and I never felt it anymore than just a few days ago at Parris Island when I stood there and met around 4,000 of those young Marines. And it didn't surprise me at all when the general who was retiring at the end of this month said to me, in all my years in the Marine Corps, I have never seen a finer quality of young people than we have here with us in uniform today. So our greater days do lie ahead. Van Dyke's poem says it well, but the glory of the present is to make the future free.  Well, I thank you all again for all that you're doing. Appreciate very much the opportunity to spend these few minutes with you. God bless you all.