Programming Throwdown - Build Automation
Episode Date: June 27, 2012This show covers build automation, scripts to streamline the build process. News: New Top Level Domains, Anatomy of Freemium, LinkedIn Passwords Leaked, $100 Masters Degree. The tools of the ...biweek are Apache Cordova (Formerly PhoneGap), Xbox Media Center (XBMC). ★ Support this podcast on Patreon ★
Transcript
Discussion (0)
Hosting provided by Host Tornado.
They offer website hosting packages, dedicated servers, and VPS solutions.
HostT.net.
Programming Throwdown, Episode 16, Build Automation.
Take it away, Jason. Hey, so we're working on a crazy hobby project that finally sort of culminated to a terminus.
Is that redundant to say crazy hobby project?
Yeah, I guess that's true.
All my hobby projects are very crazy.
Yeah.
Yeah.
This one didn't like crash or explode or anything, which is kind of nice.
Oh, okay, good.
That's a plus.
And you finished? Yes yes that's right that's
an accomplishment i guess i finished most of it i have a little bit more to do but yeah there's
art is never truly finished exactly um but yeah it's called trivipedia and so the idea is you know
i only recently found out that you could download all of wikipedia like the entire text corpus of
wikipedia in one zip If you're a glutton
for punishment or want to break your bandwidth caps.
Yeah, exactly. It's like an 8, 9
gig zip or something. Oh, it's not that bad.
And even better, you can download what's
called the Squid Logs, and for people
who don't know,
Squid is like a proxy
for like, you know, sending
messages to different servers and caching
and things like that.
But long story short is you could download for all of the Wikipedia pages
how many hits they received.
Like the page you can.
Popularity contest.
Yeah, exactly.
So I took the most popular Wikipedia pages.
What was the most popular page?
So the most popular page is Facebook, which is hilarious.
Well, this is still recent to the IPO, so...
This was, yeah, 2011 data.
So I think that, like, maybe people are, like, you know...
Because I noticed that Facebook's Wikipedia page is the second search result for Facebook.
Oh.
So, yeah, I think a lot of people are sort of fat-fingering it or something.
Maybe.
Yeah, and also a lot of uh uh and we're keeping the podcast
clean here but you know a lot of uh uh you know certain movie stars were were incredibly popular
on wikipedia's they pretty much dominated the top 100 and i was kind of surprised because i know
that's how the regular internet is is distributed but I didn't really realize that even on Wikipedia it's the most popular thing.
So what is Trivipedia?
So yeah, Trivipedia, you can go to www.trivipedia.net.
You should probably spell that.
Yeah, T-R-I-V-I-P-E-D-I-A.net. And essentially, I curated about 300,000 trivia questions from all this Wikipedia data for
the most popular sites.
So you'll get a question like, this person is like a young singer, blah, blah, blah,
born this year.
And your choices might be like Justin Bieber or Justin Timberlake or something, right?
And you'd have to click on them.
I'm going to do terrible at this game.
Yeah. There's many different categories. There's like, click on the right name. I'm going to do terrible at this game. Yeah.
There's many different categories.
There's, like, a SciTech category and stuff.
Yay!
Yeah, it's pretty fun.
There's also an Android app.
And I'm just finishing the touches on an iPhone app.
Maybe we'll hear more about that later.
Yeah, totally.
The iPhone app is going to use our tool of the bye week.
Oh, teasers.
Total spoiler.
Teasers, teasers.
Coming up.
So, yeah, and maybe, you know,
if I have $150,000 sitting in my back pocket,
I can make a TL top-level domain for Trivopedia.
Oh, yeah.
So I did want to say that I checked out Trivia.
It is pretty cool,
and I like that you can kind of be
the Trivia crowned champion of your area.
Yeah, that's right.
He uses the location.
So, you know, in the beginning,
you could be like, you know,
Truopedia Knight of Santa Clara County
or Knight of Orange County.
And as you move your rating up,
you can end up being, you know,
there's somebody who just...
I want to be king of like the Bieber questions.
I want to like study about Bieber now
just to like...
No, I won't. That's a lie. that's a lie that's a lie but yeah i think most countries now have a king or queen which means there's at
least one oh wow well that's a kind of an accomplishment that's cool to see your work
be used around the world yeah yeah the right now the emperor of trivopedia so the person with the
highest rating in the world is an american but that's only recently so it used to be a British guy so a little contention there British Emperor should be a king yeah
who knows all right so like you were saying so when you earn a hundred and
fifty thousand dollars from this yeah I can buy I can buy trivapedia trivapedia
my mind exploded so oh yeah so still, we had a few articles talking about all the different top-level domains that were sold or being sold or what were being bid on.
I guess they're going to go through an approval process.
And so top-level domain is a thing that comes at the end of a URL before the slash is specific to the website.
So like.com,.edu,.org.
These are the common ones.
And then countries have their own, so like.ly or.co.
So some of these are more popular than others.
But there's a numerable amount.
There's not too many.
Yeah, and they usually represent something very specific.
Like each country has its own, and then there's edu for university.
But up until now, it's not like you can just have anything.
Right, but now I guess, well, why?
Like, why can't we just have anything, you know?
And so they're allowing companies to, if they can, there's, like, certain requirements.
So it has to be something that's, you know, going to be useful generally.
And also, I guess, they have to support, like, other people being able to have, like, subdomains
and be essentially their own registrar
to allow people to register.
Although it wasn't clear to me that they have to allow
open registrations or how much they're allowed to charge
or what restrictions they can put on it.
So a number of companies, Google, Amazon, and others,
this is fairly expensive, like $150,000 to get one of these,
but they reserve some kind of crazy ones like LOL or.blog.
Of course, Google got google.google,
so you could do search.google.
I assume things like this,
or Amazon, buy.amazon,
or shop.amazon.
Mobile.amazon.
Yeah, and that's kind of good.
It seems like another layer of security.
I know I'm going to,
if it's something.amazon,
I know it's the Amazon page,
versus is Amazon.net really Amazon?
Like I don't know.
But maybe it's also confusing too because now like it's not obvious that if you want to guess a company's thing,
you can't just add.com after the end of it.
Yeah, yeah, exactly.
And, you know, it used to be, you know, with so few choices, each choice used to have sort of intuition behind it.
But now that there's going to be just so many choices, like you might have.amazon without the O,
like these kind of things might start coming up.
Yeah, that's right, make it shorter.
Yeah.
I don't know, one of those things you hear about
when people talk about creativity or art
or that kind of thing is that it's those restrictions,
the limits, working in bounds,
like that makes people very creative.
So you end up with these, like people ending i remember delicious was you know what del.icio.us it's like
impossible to remember but like it's cool because like they use.us to like spell it delicious or
you know like url short notes like bit.ly.oy like these i mean they have ringy names and they're
using it's like you get this creativity yeah, if you can have anything,
I guess there will still be
creativity, but it's kind of different because the
domain is so much wider open.
Yeah, exactly. So some people who
missed out on investment and name squatting
in the last round of top
level domains being open are now saying this is a huge
investment opportunity.
What do you thought? Should you go invest some money?
So not buying a top-level domain,
but once the domains start opening up,
should you go try to register as many as you can
on various top levels?
So before there was,
how many top levels do you think there were before?
Maybe 1,000?
No, I don't think so.
Like in the hundreds, yeah.
But now, I mean, there's effectively infinite, right?
Because as long
as you have 150k and you're willing to you know construct a tiny bit of infrastructure you need
to give domain subdomains to other people you can have just about anything so i don't know i think
that there might be like a land grab in the beginning but i feel like it's once people
realize like the gigantic space of names that are possible
that uh yeah it's not going to be a very good investment yeah it's hard to say because it's
always a strain to say this time is different right like oh there's more so this time will
be different than last time well maybe it won't be maybe it won't be like you can't know until
afterwards yeah it's true there's some blackmail opportunities like somebody registered i think
sucks dot sucks oh so
like now every company is going to want to you know have like amazon dot sucks so that they can
control it and not you would say bad things about them that's a great but but then with to your
point with so many what about like is horrible or yeah you know or vulgarities or right i mean any
sort of like thing after then like why does it have to be, like, if you want a JSON.is awesome,
what about JSON.is super or JSON.is fantastic?
Like, the land grab seems different to me.
Like, you could always find, seems like something that would work.
Yeah, you're totally right.
I mean, there's so many, like, permutations of just sucks or awesome.
Like, there's so many other ways you can say that, right?
And they're all available.
Yeah, so if you were going to create an app, like let's say Trivipedia,
and you wanted to have it be freemium,
what top-level domain would you choose to ensure a good success?
Or do we know anything about that?
I think we do know a little bit about the anatomy of freemium from this article,
the anatomy of profitable freemium.
I thought it was extremely interesting.
You know, freemium is sort of the future of a lot of things.
You know, games are becoming more and more freemium.
You know, there's some games like, for example, Diablo 3,
where although they did charge for the game,
there's a marketplace where you can buy and sell items
that you've, like, grinded for in the game for real money.
And the way it works is blizzard gets a cut of that and so you know if that that's proven to be a huge money maker i think
from from articles i've read and so they most likely when diablo 4 comes out they won't even
charge for it because they'll just have this marketplace mechanic so a lot of apps are going
to the freemium model. It has obvious benefits,
right? Because it completely removes the barrier of entry. Like, let's say you think you have no
faith in this company. And you know, you don't know if there's going to be a quality game,
you have no history, no track record, it has no Metacritic, but it's free, you at least give it
a shot, you'd say, let me, you know, make a character and just, you know, even if I got through the character making
screen and left, I'd have nothing
to lose, right? Yeah, I
see what they're saying. So I've played a number of
free-to-play games or whatever, but I have less
investment. Like, almost it's more of a waste
of time because you, it's a different experience.
So you're going game to game. Like, I spend very little
time in any one game because I have no commitment to it.
I haven't paid anything. So I download it,
I play it for an hour or two or a day, and never really get into it it's like oh this control scheme is
not amazing or whatever like i never put investment into learning or playing it well and i just skip
to the next one yeah and just skip to the next one so like i'm still taking up my time but in
some ways like i feel like i would be more enjoyable paying for something because then i feel
like it's sunk cost and like i need to play it because and then you'll you could be forced into enjoying something that at first seemed not good like you know you read books or
watch movies where like if you could leave at any time and there was no kind of barrier to entry of
having bought it or rented it or gone to the movie theater like after the first five or ten minutes
you might have just walked walked away or flipped the channel or whatever but because you like you
stick through it and then it turns out like the movie is really amazing and it's just like you needed to get through those first few minutes
to accomplish what the director wanted.
Yeah, that's a good point.
I mean, if it is freemium,
then you really have to impress people
from the first few hours of gameplay, I guess.
But then doesn't it come down to tricking people?
You show all your features up front
and you're going to get much more amazing features if you pay
but then it turns out like, oh, you're going to get much more amazing features if you pay. But then it turns out like, oh,
actually, this isn't that much
more amazing. Yeah, yeah. There is
a lot of that. I mean, a lot of these games, like
for example, I was playing one
called Dungeon Fighter Online.
And you
pay money to get, I guess, more
storage in your backpack.
But that just made the game more
cumbersome because a lot of the
things that you hold you don't even need so you could just you're like actually better more agile
you're just hoarding stuff yeah yeah it sort of appeals to your hoarding mechanic but at the
expense of like actually being better at the game so yeah i mean it's one of these things that you
really sort of have to get right and and nobody there's no formula there's no science yet um and so this is one of
the few articles as they come across where they actually sort of try to put a science on it and
explain like these are some models these are some you know companies have done well with it sometimes
they've done poor one thing that was sort of like a motif across the entire article was that there
is a small small subset of the population which they call whales
who subsidize the no comment to their actual physical size yeah exactly and these few whales
so so let's say you know 900 people or 990 people will play and not pay a dime but then 10 people
will pay like a thousand dollars or like hundreds of dollars each
and they'll basically subsidize the game for everybody else yeah and that and that's true for
games and it's also true for programs like dropbox and evernote and things like that so across the
board that's been one common observation i thought that was really interesting that is interesting i
mean i think there's a balance. If you like a service,
you kind of should pay for it because otherwise you can't
complain if it goes away. You weren't paying anything
for it. It's annoying. We've all had favorite
web services or sites that go away because
the author just didn't
have time because they weren't making like Trivopedia. If you don't make
a lot of money off of that, your incentive to
keep it maintained is lower, like no offense.
But if it's hugely successful
and people are able to contribute money or generate, like you're going to, you know,
and people are able to contribute money
or generate revenue for you in other ways,
you're much more likely to stick with it.
I mean, even like, look at the inspiration of Tripopedia.
Wikipedia itself is constantly in need of money
and they're constantly sort of like on the edge
because they have such high bandwidth expenses.
Maybe you couldn't monetize it though.
It's a fine balance to walk.
Yeah, yeah. Freemium is i'm
sorry wikipedia is donation where which is has its own set of interesting mechanics and everything
i have a feeling that you know when kids grow up they're going to think that was it jimmy wales
that he is like everything because because you'll search for say like george washington his personal
plea and you see like yeah his personal plea is the very first thing.
So it's like, I have a wonder
if you went to like a five-year-old
and he said, who's George Washington?
And he had a picture of him and Jimmy Wales.
Oh no.
It'll be like the McDonald's arch
as like most recognizable face.
Yeah.
So if you're trying out all these freemium apps
and you've got to generate an account
and create a password and you know, what's to say that your password's not going to get leaked like uh our next news
story where linkedin yeah linkedin totally busted right so and uh yeah i have like a personal
gripe about this because you know i was one of the people whose passwords were leaked i got the
email from linkedin when i logged in they told told me to change my password, et cetera. Fortunately, I use a, like, we use KeePass, which is actually something, I think it was a tool of the week.
Yeah, so my password, that password was just a throwaway.
But in the past year, my LinkedIn, my Joystick forum password, and my Twitter password have all been leaked.
And, in fact, Twitter twitter they were able to i
think we talked about this on our show but someone went into my twitter um and my facebook which they
both shared the same key pass password i don't know how that happened but i think i there's some
there's a one in a billion chance so you just got lucky pretty sure there was some laziness going on
there but uh so that yeah all these passwords got leaked and someone went in and posted as me and it was not pretty.
But I had to clean all that up.
So, you know, I personally am like, this is really upsetting because I use KeePass.
I try and keep everything secure and these passwords are constantly getting leaked out.
But at the same time, I can understand them wanting to have an identity.
You know, if you use like login with Google or something, then you sort of dilute your brand.
You know, like LinkedIn, like Facebook's not going to have a login with Google account and vice versa.
So I can see sort of both sides of it.
I can see, you know, businesses wanting to have like their own sides of it. I can see businesses wanting to have their own identity of you, but then
I can also see how
a lot of people aren't taking security seriously.
A lot of apps on
the iPhone and iPad
and stuff, I know more about that than Android,
but they seem to offer
those and some websites now offer
both. Create your own account
with that company or use
login with facebook or
twitter which i actually like that overflow does that oh okay so i actually feel like that might
be the best of both worlds like hey if you're too lazy like do this but if you you know if you want
to just create an account because the problem is like some stuff is like only with facebook
because they want to spam your board or whatever oh yeah but all your friends yeah it's like that's
annoying so like you might want to create your own account. And then also if you don't have Facebook,
I don't have a Facebook account.
I think I do somewhere, but I don't ever, ever, ever use it.
And so I wouldn't even know what the login is for it anymore.
So I would just probably ignore the website.
So it's nice when they have an option to create your own
and I can just generate something random and use and try it out or whatever.
Yeah, yeah, totally, totally.
But, yeah, these passwords got leaked.
If you use LinkedIn, supposedly they said although the passwords got leaked,
no one's account was compromised because they know which passwords were leaked.
And so they just locked down those accounts.
And so if you got the email I did, the next time you go into LinkedIn,
it'll just have you change your password.
Oh, that's nice.
That's nice.
You know, that's something that I think companies are doing a better job.
Security is still a big issue.
But being upfront, like, hey, something happened to us.
And so, like, hey, like, let's just reset everybody or, you know, let's let everybody know.
Like, I feel like they're being much more responsible about that for the most part.
I'm sure there's exceptions we don't hear about.
Yeah, totally.
But, yeah.
So if you wanted to, like, learn about security, you know, you might go and try to get, like, a master's degree.
But that's pretty expensive.
So somebody should do something to, like, offer a master's degree for, like, maybe, like, $100.
Man, $100?
You mean $100,000?
No, $100.
$100.
That's what our next news article talks about.
Sebastian Thrun, like, a crazy guy who I keep seeing pop up around the internets.
Yeah.
He was, like, a Stanford professor. He he's like, he was like a Stanford professor.
He's like running his own online college now.
And like, he also, I think he even works at Google.
Like, I don't know how one person has enough time to do all of those things.
But he, in an interview was talking about that, you know,
he wants to revolutionize online education, which I agree.
I was talking to somebody about saving.
So I have a young child, you know, my daughter's, you you know be many years before she goes to college and so one thing you
think about is like should i start saving for you know college because although it's many years away
the earlier you start the easier it is um but i don't even know like i do and i probably will
but i don't know that education will be the same for my daughter that that we went through yeah i
think that you know the you know as we move to online and things like that the number of students that
a teacher can teach grows dramatically and i think the bubble on education might burst you know well
not just like the ability for a teacher to teach so many more people but the best teachers can
teach the people i mean i had a lot of i went to a great college, I had a lot of teachers. I went to a great college, but I had a lot of teachers who, you know.
And so if you could get the best teacher, and then this sounds really bad,
but, you know, just like other people, right, like those teachers
or whatever become kind of teaching assistants.
So because there are so many students, they have the same size class,
but somebody else is doing the lecturing, and they're really there one-on-one
helping people, going through the concepts in fine detail.
Like I think in general that could probably be a better model yeah totally so sebastian is trying to he's currently he ran a cs 101 where you built your own search engine which
oh i actually kind of wanted to do like just to do it and then he did introduction to ai
which of course stanford also had one but he did one which was uh learning to drive or learning to program self-driving car no nice so I don't know
if that comes from his Google work or not are these classes that anyone can
just go to and yeah so I don't think there's any cost so it's completely free
you go you take the class they have tests they have homework late that's a
pretty big commitment I've done a couple I've never successfully finished them
because I just can't bring myself to do homework and I haven't paid anything. You have like three virtual Fs.
No, I have way more than three virtual Fs. It's horrible. But yeah, so anyone can register. I
mean, it lists like what are good prerequisites. So like if you're going to do CS, like it's
certain math and statistics you probably need to be able to be successful. You can probably pick
it up if you're really dedicated to it.
And you could totally go at your own pace. So let's say you take the class and it turns out, oh, I don't have what it takes to take this class.
You could take another class.
Like you could take algebra from iTunes U.
There's 100 universities that have that online.
And then go back with your new knowledge.
Yeah, try again and try again.
So he's trying to do a world record setting.
I forget how many.
I believe it's in the hundreds of thousands.
I don't have the article up in front of me but hundreds of thousands of people he needs and
he's going to do an introduction to statistics course and he wants to set the record for most
people in an online course um and so this is this is pretty good i encourage you if you're
interested in statistics statistics is something that i think in modern society that everybody has
to have you hear statistics thrown at you constantly to be able to do expected value,
to be able to do these kinds of things.
You don't need to be able to do Bayesian inference
or crazy complex, all that stuff's really cool
and very useful.
But as a person in a modern high-tech society,
the amount of things that if you knew statistics
would help you clarify or think through
or attempt to make rational decisions
is very important.
It's very important to know statistics.
Yeah.
I mean, even just like basic causal analysis, you know, like, you know, everyone's heard
the cliche, if you flip a penny three times and you get heads all three times, what's
the chance you're going to get heads the fourth time?
Of course, it's 50-50 because, you know those there's no interdependencies just because
you got heads the first three times doesn't mean anything about the fourth flip right and there's a
lot more than just that simple rule in statistics which will really sort of give you good intuitions
to make smart decisions and then the subtlety to that right like if you flip ahead four times in a
row that fourth time is ahead now like you know next in flips, it will revert to the mean.
So chances are you will have less tails than head,
but still any one flip is the same.
So it's all this crazy stuff.
Or one always gets me, which I like, and they're kind of enjoyable logic puzzles,
is if somebody has two kids and you know that one of them is a boy,
what's the chance that the other one is a girl? If somebody has two kids and you know that one of them is a boy what's the chance that the other one is a girl somebody has two kids and you know one of them is a boy what's the chance that the
other is a girl i feel like i'm walking you know yeah yeah but i'm pretty sure it's 50 50 right uh
so it actually turns out it's not as it gets confusing so let me see if i can do this correct
maybe i'll be wrong uh so i believe that so the reason why is because either one can be a boy.
So the chance of the other one being a boy means that both have to be boys,
which is a one in four chance.
So the chance of another one being a girl is the other of that.
So it's a 75% chance that the other one is a girl.
Yeah, yeah, that makes sense.
So it's because I didn't tell you the first one is a boy.
Yeah, yeah.
What's the second one? Either of them is a boy. So I told you only one, and I didn't tell you the first one is a boy. Yeah, yeah. What's the second one?
Either of them is a boy.
So I told you only one, and I didn't tell you the position.
Nice.
I think that's right.
Somebody's going to email us and tell us I'm wrong.
That sounds totally legit.
So, okay, anyways.
If you want to trick your friends, there's a lot of puzzles.
And maybe you could read about those statistics courses
on your new Microsoft Surface tablet.
Yeah, yeah.
Maybe there's an app for that.
Oh, wait.
You're giving away what our thoughts are about it.
Yeah, at this point, that's a double spoiler.
But, yeah, basically the Microsoft Surface tablet was announced.
And I think you know more about this than me.
Oh, well, I got trapped into one of my friends is like,
oh, are you going to watch it?
I'm like, oh, okay, all right.
I guess I'll watch the live announcement.
And this is, I think it was earlier this last week,
we got messed up technical difficulties,
so we're redoing some of these news stories.
We're never particularly on top of the ball
as far as getting our news stories very timely.
But that's okay because we like to talk about the broader concepts.
And you can find all of the links online in our show notes.
But Microsoft had this live announcement, like we're going to talk about this stuff. And you can find all of the links online in our show notes. But Microsoft had this
live announcement, like, we're going to talk about this stuff.
And then as soon as I saw what it was, I was like,
oh, fail. It's like, we've made
something that's, like, more than a tablet.
It's got this keyboard and a kickstand.
And those are all really amazing things.
But, you know, part of the allure
of a tablet in my use is, like,
it's simplicity. You do one thing at a time.
It's very simple. If I want to do anything more, I'm going to get on my computer yeah but i want my tablet to be simple and awesome
and really good at what it does and you know be easy to use and i can use it late at night when
i don't want to have to do thousand things and it has good battery life and every time you try to
make it do something a little bit more you're you're sacrificing something else you know either
cost battery life like something you can't get them all and then the fact that you know, either cost, battery life, like something, you can't get them all. And then the fact that, you know, they're going to have like a lower end tablet, which the
pricing's not quite out yet. And then a higher end tablet is going to be essentially a laptop.
And it's just like, they're going to have a full processor. I'm like, how hot is this thing going
to get? What's the battery life going to be? You know? And then, yeah, it's amazing. They showed
it running Lightroom, which is a photo editing app. It'd be amazing to be able to run Lightroom
on my tablet. But you know, if it's going to have to running Lightroom, which is a photo editing app. It'd be amazing to be able to run Lightroom on my tablet.
But if it's going to have to do all these other things and the battery life is going
to be horrible and it's going to be very expensive.
Yeah, I mean, wasn't the claim that it could run any Windows app or something like
that?
I think that was one of the claims of the more advanced ones, like the Pro model or
whatever.
But I don't want my...
So it's going to open Pandora's box, right?
Yes.
I mean...
Because now they have to support all sorts of quirks from previous Windows versions and crazy things.
I noticed even switching between my phone and I have a Motorola Zoom tablet,
the compatibility varies wildly.
An app that will work fine on the phone will just completely bomb on the tablet.
And it's not just the obvious things like the screen display being shifted, although that happens a lot.
A lot of apps, you go to touch and there's some weird
shifting going on because they weren't expecting the screen
size of the tablet.
But even just more subtle things, like certain processes
will just crash.
Like there's this thing called Open Faint, which is a way to
save your score in the cloud. Like a high scoreboard thing.
Yeah, yeah.
So any game that had that would crash on my system. Oh.
Yeah, yeah.
So it has nothing to do, really, with the display or anything.
Yeah, so the iPhone 1's not as bad.
The iOS does.
It's pretty good.
I haven't had a lot of issues with that.
Yeah, my phone's good about that.
But yeah, I mean, just the Windows thing.
Like, I mean, oh, it'd be so cool.
I could run Quick 2 on my tablet.
Yeah, I'm sure that'll be there.
But it's like, oh, but what is the experience going to be like? In reality, although it's cool
to do that, people need to have the tablet experience in mind. You want somebody to sit
down and design it. The more you try to make it do and the less custom tailored it is,
the less enjoyable it is to some extent.
Yeah, totally. You know what would be awesome is if they had it run the iOS simulator.
Oh.
And you could download iOS apps.
Yeah, awesome.
That's a word for it.
But another cool thing,
they have the cover that has a keyboard on it.
That is cool.
And I thought that's pretty cool.
But, you know, I mean, anybody could do it.
It's not like Amazing Leap Forward.
I feel like it's a me too me too you know
and then it has a kickstand on the back you could flip out the little stand and it stands up no
one's done that before like i much prefer having it without this stand be a little thinner and then
i'll just get a ten dollar aftermarket stand that is exactly the stand i want for my use case you
know yeah so um but this one comes in hot pink.
Whoa!
No, no, no, no, no. You didn't tell me.
Hot pink?
I'm totally buying one now.
Oh, man.
Gotta get it.
Okay.
Well, anyways.
I think it's time for our...
I don't have a good transition.
I was doing so good, but...
Tool of the Buy Week.
That's right.
We made up for it by both saying that at the same time.
It's awesome.
So, my Tool of the Buy Week is Apache Cordova, week that's right we made up for it by both saying that at the same time it's awesome so um my tool
the buy week is um apache cordova which used to be called phone gap and this thing is pretty awesome
basically the way it works is you know right now if you want to make an app for the phone as i as i
did with trivopedia you know you either have to write a separate app for every type of phone.
So in other words, you have to bust out your Java skills
and write the Android app in Java.
Then you have to go to the iPhone and write an Objective-C app.
And then you have to go to the Windows Mobile.
And I don't even know what that is.
That sounds like fun.
Yeah, that's painful, right?
Incredibly painful.
So fortunately, all of the phones support JavaScript.
So actually, you can write JavaScript code for the iPhone.
And for Android, I think it pops up like a web view and launches your JavaScript.
But it feels like a natural app.
So you can actually, if you did it right, you can write your code in JavaScript
and it would work across all these devices,
assuming you had kind of the right middleware layer.
And that's what PhoneGap is.
So PhoneGap, you write HTML and JavaScript
as if you're making a website.
And then what PhoneGap does is it converts
your website buttons and your website pull-down menus and stuff into the native controls.
So if you were to, say, click a link in a website and it takes you to a new page and then you have the browser bar at the top,
that's not really the experience you want when you're making a native phone app, right?
No.
This sort of obfuscates all of that.
So it gets rid of the browser bar.
It makes the URLs go to like, not really go to real pages,
but they sort of compact all the pages
into the application.
So it feels very smooth and quick.
There's no loading screens or anything.
Yeah, yeah.
So it's like it's storing locally all the pages.
Yeah, exactly.
It sort of like does this compilation process.
And it's great.
You know, I had it.
I tested it on, you know, I made the Android app for Trivapg already.
So I didn't need to use PhoneGap for that.
But I did anyways.
I built an Android version, and it ran pretty well.
Oh, cool.
Yeah, and I mainly used it for the iPhone version and it went really well.
So pretty happy with the performance.
So are we going to see you on the App Store soon?
I hope so, yeah.
I'm actually on the Android App Store already with the native Android app.
I should be on the iPhone App Store pretty soon.
I have to save up for that $100 developer's fee that they want to smack me with.
It's like getting hit with a 40-pound trout.
Bam!
That's a large trout, 40 pounds.
That's a big trout.
Getting a trout to the face is not fun.
That sounds pretty cool.
So can you also run it on the website?
If you did it from the beginning,
could you have it be your main website as well?
Or would that be awkward?
Yeah, you can't do that.
But I actually started
from the web version.
The very first version
was just the website that I copied and
pasted into PhoneGap. And that
actually worked. It was clunky because it was meant
for a desktop. So you
can't actually do PhoneGap for
PC. But you can
take your website and port it over and it
is close to the same.
So it gets two thumbs up for you.
Two thumbs way up.
And that's free.
PhoneGap's totally free open source.
And supposedly it'll even work on like Windows, Microsoft Surface tablet.
Which you are totally buying in Hot Pink.
With all the money you make from Trivipedia.
Yeah, if enough people buy Trivipedia, I will get a hot pink Surface tablet. Yay!
That'll be our cover
art forever. Yeah, exactly. If that happens.
Maybe we'll just go to the Microsoft
store and take a picture of you with it, and then
it'll be our cover art. No, yeah, it'd be awesome.
I think I'll do it. I'll have two.
Like, you know how you see those
car commercials? People with two guns? Oh, no. No, where it's like a guy
and he's got two Budweiser
babes or whatever.
Yeah, I'll have the two pot pink Surface tablets.
Okay, we won't tell your wife about this.
I don't know if she listens to this show or not, but my tool of the buy week is Xbox Media Center,
which is actually not called that anymore.
Oh, really?
Just XBMC because it's not just for the Xbox anymore.
So this was a project that, if I recall correctly,
originally started out on
the original Xbox, which is a
PC, just without
full windows on it.
And so they re-scripted it. It had
a program that would run, and you would have to hack it,
and you could put this on there, and it made it into, what it
says, a media center. So you could play
DVDs like a DVD player. You could
add a hard drive in the Xbox.
You could put stuff on your hard drive and you
could play MP3s and movies
that way. Just a really flexible thing. And over
time, it's just continued to support other
platforms. And they did a really good job
that some open source projects managed to do
just amazingly well, which is kind of make a
completely modular
platform. So they're able to just have
this back end to run on the Xbox,
but this whole front end, like UI
and media manager and rating
system and all this stuff that could be platform
independent, it does allow them to kind of
support even more than the original Xbox.
Now I think it even runs on the Xbox
360, I'm not sure, but it'll
run on your PC, so you can just run it as
what they call a 10-foot interface.
So something that you can use from your couch with a remote if you have it hooked up to your computer.
I think it supports OSX, Linux, Windows.
Also, I think they have a version to run on the Apple TV, so if you jailbreak your Apple TV, you can run it there.
Or you have to jailbreak.
Yeah, you do have to jailbreak because Apple doesn't actually let you run any apps.
It's like a download apps on your Apple TV.
I don't have an Apple TV, but I believe that's correct.
As you can jailbreak it, you can run your own apps,
and then this is one of the apps,
or maybe it's like an actual boot to it as an operating system.
Wow, you can even do it on the iPad.
That's impressive.
Oh, that's cool.
So that's probably like actually two,
maybe like the same front-end interface thing, right?
So what happens is you can just set up on a NAS,
a network-attached storage,
or just like a PC running or even just internet
and just have kind of that as your back-end, a source for media and data or whatever,
and stream it to this XBMC client and just run stuff, play stuff.
And it's cool because some of these devices are crippled,
so you get an Apple TV and it's like, I wish I could do a little bit more.
Well, Apple TVs are pretty cheap.
I think they're like a hundred dollars so i mean way easier to maintain
and take care of it and still do what you want by installing this on there than running like a
whole other pc and paying for extra power and and all of that um so that's kind of cool or space you
know pc takes a lot yeah and apple tv is very small or even like xbox 360 or an xbox you can
buy them very very cheap so if you have an entertainment center
and you can put one of these in there,
and for, you know, what does the Xbox sell for these days?
Probably like $50 for a used one.
You don't even care if it's probably got a broken optical drive
if, you know, assuming there's another way to install the Xbox.
You just need it to do one thing, right?
So like you can get it really cheap.
And then, you know, whatever the back end you have for your house,
you can have all these different front ends.
And it's just a really nifty thing, so check it out.
That's totally awesome.
Also, I use it as even just on my Windows PC at home,
instead of Windows Media Center,
because I have a TV tuner card.
This doesn't support TV tuner,
at least not that I saw.
I didn't really try that hard.
But for just general like watching movies or whatever,
the Media Center on Windows is terrible,
so this is much better.
Yeah.
So I like this a lot. So I use it to do stuff on there that's very useful um i've been thinking
about this is off topic but so like decking my like you know my space out with like all sorts
of like front end tv media players but actually really complicated to like not spend a lot of
money and have something that my wife and you know one day my child and like other people that just
come over or whatever be able to use and not be like oh turn on this computer
turn on the tv switch the hdmi port to this you know go over do this like it's really common i
really want like a really nice i feel like there's a market there somebody like had a really well
thought out customizable system to do all this maybe it's not possible maybe i'm pipe dreaming
but yeah because i mean for for me for example example, I have the same problem where, you know, if you want to play
the PlayStation, you have to switch over to HDMI too, and you have to know
that. That right there is hard. Then you have to, like, turn on a PlayStation controller,
boots up the PS3, all that stuff. Then if you want to use the PC,
you have to go in the coffee table, get the wireless keyboard and mouse,
switch over to pc you know
turn on the computer which it's a laptop and we keep it closed so you have to like open the lid
you know turn it on close the lid yeah it's all this stuff you know like the general like dvd
player playstation xbox like that is is okay but like if you get something i don't know if you
ever used a roker and apple tv like something that but that did this like streaming really well
and had like an integrated backend.
So I knew it was going to work.
Like there's other stuff like Western Digital
makes something that's a front end.
I think Roku even has some stuff.
I mean, these people have things
that'll stream on the front end
and Xbox Media Center is close,
but then I still have to get a compatible backend
and make sure the right codecs are installed
or the right conversion
or run like something and make sure it stays updated.
And it's just, I wish there was like some really
nice low-cost like maybe you should write one on your raspberry pi that you
will get eventually what day did somebody oh a friend of mine a colleague
of mine at work he signed up for the raspberry pi around the same time I did
maybe a month before and he got an email saying
that they were gonna ship it to him in like a month and a half oh it's gonna be
forever for you yeah so it's minimum month and a half so I'm thinking like in
three months I'll have one when I signed up when he's of course it could be a
million people in between so by programming through it on episode 100
yeah exactly I mean running on the raspberry pi
yeah by the time we run out of programming languages
i feel like recently that it's one of those what is the thing like if you had
talking about growth and like you try to count something like it would grow
faster than you could count it so i feel like programming languages that
way we there's a programming released more
frequently than we do the show yeah so like we even if we keep going There's a programming released more frequently than we do the show.
Yeah, totally.
So, like, even if we keep going, like, we'll never – they grow faster than we do.
And it's, like, even if the, like, you know, if we were omnipotent and the number, like, the number, let's say, wouldn't grow or would grow very slowly.
But as people write in and tell us about new languages and things, like, our awareness, that number is growing much faster.
Yeah, that's true
and i don't think yeah that we're never seeming to catch up which is great for the show oh i mean
great yeah it's bad for our queue but it's amazing for the show so all right well on to this week's
topic so this isn't a language no it's not it's uh it's actually sort of I guess a process concept yeah yeah it's
so build automation yeah so what is the one thing everybody thinks so when I
heard this topic I thought of one thing make and make files make files it's just
me I dread make file oh man somebody starts talking about make files and I
just want to stick my fingers in my ear and go la la la la la la la la so bad
you know if if I get an error in like, you know how most programs,
if those of you out there have done like Linux stuff,
they'll say, oh, you know, to install this,
just download the zip file and then run, you know, dot slash configure
and then make and then make install.
Yeah.
If any of those three fail, I give up.
I just don't want to.
Raise my hand.
That's me.
That's me.
It could be like, It could be so specific.
It could say, oh, make file line 31.
This if should really
be an end if.
And I won't even, it's like, forget it.
I'm not touching it.
Yeah. Or if it's like,
sometimes you install a package and it's like,
you don't do.slash configure, it's like something else.
It's like, oh, you have to go in and enter this.
Enter your platform type.
Automaker.
I'm done.
But it is a very hard topic.
I mean, building complex, we talk about many module,
many people working on a common programming source base.
And how do you get all of that to build down into one,
let's call it a deliverable, an end item,
a thing that you're going to use and run.
Yeah, yeah, totally.
Yeah, I mean, it's completely vital.
As painful as it is, there's just...
If you think about it, you can do many build commands in a single command.
Let's say you had three C++ files and you wanted to compile all of them into one object.
You can do the "-c", and then the file names dash all right but like eventually you're gonna run
into something where you have to do like many different things you have to follow
some kind of recipe or like you need to build it for two systems yeah or like
you need to build it with you know this library for math or possibly this
library format yeah or you have two parts of it you have the math library and. You have the math library, and then you have the graphics library,
and then maybe you have a third part like the executable.
It's like combinatorial.
Yeah, yeah, exactly.
And it's like the executable needs a math library.
Yeah, I mean, you need to have some way of controlling the build process.
And making sure, so I've learned this the hard way,
making sure everybody on the team is building it the same way.
Yeah.
So if you just let people like, for instance,
like let's stick in the C++ world for a second.
So like just use GCC to make it, right?
Like, oh, I'm just going to do this on the command line.
Like, well, what optimization level did you use if we're
tracking down a timing problem or any other set of potential flags?
Or worse of all, like different people have
different things in their
BashRC script or wherever.
Stuff is happening that they're not exactly
aware of or don't remember and
tracking down. That happened to me and a colleague of mine.
I was getting an error and
nobody else on the team was getting the error.
And it was only me and I had submitted a fix,
like a bug fix because I thought it was a bug.
And it turned out they all had
something additional in their setup script that I didn't't have and it turned out oh I don't know if it was a bug or
not like it just we got into a debate about like well which way is the right way but for sure
everybody needs to do it the same way yep yeah totally so we should probably go through the
history this is uh this has a pretty like crazy mixed up history why it's such a crazy mess right now.
It's grown very organically.
And I'm sure there's even stuff we're not even going to talk about.
History is just kind of like a travel through time as opposed to a complete history because
I'm sure there was Jason's make configuration script that you probably had that was personal
and that may have been the very first one.
So this is more of like an arrow through time yeah exactly yeah so and i don't even know
which one of these two came first but the first ones that i know of are make which everyone you
know if everyone here is typed make um is almost certainly using bsd make which is that's the one
that everyone kind of uh uh should be familiar with then there's also g make which is GNU make and basically those two essentially
do the same thing which is they you know they parse the make file and then they
turn the make file into a bunch of commands and so we'll get into sort of
make files and what those are and things like that later but they sort of process
the make file directly so someone goes in by hand and writes the make file,
and then these guys go through and, you know, as sort of interpreters,
just as if you had written a Lua file or a Python file,
these guys go through line by line and parse the make files.
So make files there is kind of like the programming language of make files.
Yeah, exactly.
Yeah, so in studying for this, it really brought to me me how much I, what is the right term, conflate?
I put together the idea of Make and GCC.
So GCC is an amazing set of software.
It's so powerful.
And in my mind, Make and GCC are kind of linked.
They're kind of one and the same.
But they're really not.
No, totally different.
Yeah, so you can use Make to do all sorts of other things if you really wanted to in fact I might be like turning complete
I'm not really sure but yeah it's close yeah yeah you can definitely do all
sorts of crazy stuff with it for sure then there's so then you know people
quickly realize that make files were kind of brutal it's all right then get
very long very and they the hard part about it is
that there's so many
sort of variables
that you're defining
and then you're also,
like,
defining all of these rules.
So,
a variable might be like,
the flags for this program
are dash O3
dash P
dash G.
That's a variable.
That's not,
those aren't the right ones.
What?
I'm just kidding.
You're compiling it wrong.
You totally got me.
Totally got me.
We're actually recording the podcast in the same room.
And so Patrick could see the fear in my face.
I was like, oh, no, Dennis.
So that's a variable.
And then you also have actual rules.
So, for example, whenever you have to do something,
whenever you have a rule called that ends in.cpp, call gcc, you know, the rule name,
and then the rule name.o or something like that. And so make files have both of these sort of
intertwined, you could put a rule here, you could put a variable variable there so these a lot of these make file code generators like automake and qmake and cmake they try to sort of
have this like data definition kind of thing like cmake for example uses a key
value pairs for defining all of your variables and so that makes it very easy
to sort of visualize and see and they even have groupings of variables.
So you can see, like, these are my compiler flag variables.
These are my path, include path variables.
These are et cetera.
And then CMake also has the CMakeList.txt file, which has the rules.
But by kind of separating those two, it sort of makes it easier to understand.
Yeah, so CMake also has, like, a GUI.
Yeah.
So if you want to, I mean, you don't have to, but it also makes it easier to represent.
And then they make their own
kind of intermediate file.
Like, this is like the CMake description
of what you are.
So like you say,
certain sorting is enforced
or certain groupings are kind of taken care of.
Yep.
And then from then,
you can kind of compile,
interpret,
translate that CMake file
into a normal Makefile.
Right.
And then it handles a lot of the boilerplate code,
the organization, the complex branching structures you might want.
Yeah, totally.
So that was sort of like the second phase.
They got into the automake, CMake world.
That's sort of the next generation.
Code writing code.
Yeah, it's getting scary.
Code writing code.
We must go deeper.
That compiles other code. So now the most modern is sort of this ant, maven kind of stuff.
And so these are normally associated with like Java.
So kind of like around the time like Java was coming out because Make and GCC were kind
of like kind of intermixed.
And so this is an opportunity for people to kind of say, well, we're doing Java, so it's
a different methodology we're going to kind of put in.
And these ones actually take it a step further.
So not only are they sort of at a higher level as CMake and QMake and things like that,
but especially in the case of Maven, it's also in the cloud.
So you can say, hey, I need the pill, the Python imaging library.
Your Maven file can say that.
And it can actually go to the cloud,
find a copy of the Python
Imaging Library, pull it onto your machine
and build it without you having
to distribute
that with your code.
It's like the idea of
adding that, pulling it in from the internet
is in the build file
and so that I think is really awesome because
one of the hardest things is is
You know distributing your code and then realizing like oh I was using this version of free image
And now like Ubuntu 13 is on that version of free image and my make file doesn't work anymore
Yeah, and like knowing like if you can have it pull which I think it's able to do like pull
the latest version right yeah I keep going the latest version of
Python image library like it could be confusing in some sense like oh why did
this not work or why did it stop working or like all these things but on the
other hand like it means that if your end user goes and grabs the latest stuff
you know it'll work and then if something does break you can go ahead
and just fix it yeah and if it doesn't, you know it'll work. And then if something does break, you can go ahead and just fix it.
And if it doesn't or you don't want to because there's some drastic change,
you can always lock it in a set version, and at least it's explicit.
Like, it's not that it was whatever Python imaging library I pulled on June the 2nd of the year.
No, it's just like, you know, version 1.6.3.4.2.1a.
Yeah, yeah, exactly.
Yeah, so I mean, and this keeps you from running into like shared library hell or DLL hell, as Windows people call it,
where, you know, you were using this version of free image and you included it in your make file.
And so even though this person has a higher version, which would have worked, now they have to build your version too for your app.
Oh, that points out another pet peeve of mine.
People have version numbers, and they'll have an upper bound on the version number.
And even though there's no reason, it's just that was the highest version that was around when they were.
And you have a higher version, and you have to go in and edit to allow your higher version because you know it'll work, and you can't find the older version.
Yeah, this is brutal, man.
Sorry.
No, no, it's cool.
And so now also, you know,
sort of in parallel with the AntMaven stuff is you're starting to see more of the build process
integrated with the IDE. So for example, if you use Eclipse, if you create a new C++ project,
and you drag a bunch of files into some folders there, Eclipse is smart enough to sort of look
at the files, you know, index the files, come up there. Eclipse is smart enough to sort of look at the files,
index the files, come up with the dependencies,
and do all that good stuff.
Making things easier.
Yeah, totally.
Although I guess then when things go wrong,
maybe it'll be like assembly.
Nobody will know what the underlying,
how to get stuff built actually works.
Yeah, I've had things bomb in Eclipse,
and it's just been brutal. I mean, it comes down to like you have to remove files and add them back or like remove a file.
You keep removing files until it works and then it gets ugly.
Or when it's like tied in as well with source control and then like stuff gets all like really bad, really fast.
That's so bad sometimes.
Yeah.
So that's the history.
As you can tell, it's still kind of a hard thing to deal with.
But it's something that as software engineers and coders,
you know, we have to deal with on a daily basis.
Yeah, you really got to know.
It's good to be aware of it.
And you already kind of talked about, but I mean, like,
if we didn't have this, it would be horrible.
Yeah, that's right.
This is better than the alternative.
And there really are a lot of features that these things bring.
So you kind of hit, like, dependency.
So, like, there's the concept that if i depend on module
b which depends on module c i depend on module c well you say no you don't you just depend on
module b yeah yeah but module b like there's this you have to kind of walk this graph yeah and it's
not just like one to one to one i mean they can get you know to many to many and so you could be
expanding like i depend on one project which depends on five projects which depends on each
of those depend on two or three more you get this expansion that can get really big really really
fast yeah and so something has to kind of go through and understand like oh okay I need to
build this first and this second and this third and kind of yeah come up with that whole structure
yeah I mean imagine like if you did this yourself let's say you um just had a dot sh like some shell
script that just built all of your files.
And then you had, let's say, like a graphics engine and a music engine,
and then your game engine with the executable in it, right?
So you started off with like, it built the graphics, and it built the music, then it built the game. But then for whatever reason, all of a sudden, you know, you decided
that, oh, I want there to be, like, I want the graphics engine
to depend on the music for some reason.
Like, if a certain music's playing, I want to play an animation,
and instead of writing an API, I'm just going to have, like,
the graphics code import the music.
Bad coder.
That terrible code. Don't ever do that.
Bad coder.
But now you have to, like, rearrange your shell script.
And, you know, in this case, with just three things,
you would just move it down.
But you can imagine this getting way, way out of hand.
And also, your shell script doesn't self-document.
The fact that things are in a certain order,
you know in your head that the graphics engine has to be built first,
but the shell script just has three lines.
I mean, it doesn't, unless you write your own documentation there,
it doesn't encode
that one thing depends on the other.
Yeah, that's right. And even just
having a list of what all the things you depend on.
Like you said, so if you're going to email somebody else
your source code or post it up to a
source control somewhere, you know, then that
way you can kind of say, like, hey, this is all the other stuff you need
as well. And some languages have
kind of batteries included features that make
that easier than others. Other thing you talked about a little is is the kind of cross compilation or
even just like for 64-bit versus 32-bit or you know like i need big indian versus little indian
like all these things like you know you may support all of those features in your program
but you got to pass the appropriate flags to you, to the compiler,
to possibly the operating system, like, you know, all these different things. And you, sure, you can do that, right? Like, you could write that file, but it's much nicer to have a tool to help you
write those things and to keep them organized. Yeah, and in, like, in the same way as most
languages are written in themselves, you know, we've talked about that every now and then where,
you know, Python comes batteries included. So a lot of the things in Python, like the entire standard library, is written in Python.
So in the same way, a lot of, you know, a lot of make files reference things that are also written in make that just kind of come standard. your example of big indian versus little indian they've already done the grunt work of calling
the sort of crazy kernel level libraries to figure out if your machine is big indian without you
manually specifying it and you just have to say like is big indian or something and some you know
the make file you know program writers have dealt with that problem for you so that's a good point
because it's depending on what machine you're compiling it on,
not just compiling it for.
Yeah, I mean, you might say, like,
I just want to compile it for this machine, whatever it is.
And so if you don't know what OS call to make
to learn all of the intrinsic properties of this machine,
the Makefile guys, they do. And they've done all that.
So yeah, another big part of makefiles are using conditional logic.
So for example, FFmpeg is a popular MPEG encoding, decoding library.
And they're constantly under fire from the the, was it RIAA? Oh, okay. And other like organizations that are against sort of re-encoding of music
and things like that.
So what FFmpeg has done is they've structured their make file in such a way
where you can pass a flag called, I think it's enable non-free,
dash, dash, enable non-free.
And if you pass that flag, they'll give you all of the codecs,
like MPEG-4, which are sort of in dispute
and are not sort of like are under patents and things like that.
If you want to be on the safe side, let's say you're a big corporation
and you're worried about getting sued and things like that,
you can not put in that enable non-free flag in the make file.
DAN GALPINIUK, And then it won't be in your code.
DAN GALPINIUK, And then that stuff will be out of the code.
And so this is really important for FFmpeg, because
they want to make sure that not only can you not use this,
but it's literally not in your code.
Like the code's not in your object, so you
can't get in trouble.
DAN GALPINIUK, Yeah.
No, that's pretty good.
So we already kind of, I think we spoiled most of the
strengths talking about features. But one in here that is good that's pretty good. So we already kind of, I think we spoiled most of the strengths talking about features.
But one in here that is good that you're talking about is also, you know, even if you could
write shell scripts for all this stuff because you are an awesome programmer, which you are.
Likewise.
No, that's not true.
You're wearing a Nintendo controller t-shirt, so I have no, my argument is invalid.
So parallelizing and distributing.
I mean, this is something that if you were going to do on your own,
it would be like you'd have to write your own library.
I mean, it'd just be crazy.
But here the make files can handle like once they know the dependency graph
and they walk this, they can say this build can go on
on a different machine than this build because it's not needed until this step.
And so it can kind of chop and slice and dice it, you know,
eight ways between here and there
and say like, this is our plan.
This is how we're going to compile everything.
And so use things like distcc, distributed gcc,
like these kinds of things.
And, or even just, you know, you have multiple cores.
Handling all this is very complicated
and can be quite complicated.
And make files can really help you with that.
Yeah, totally.
Like if you've ever done the whole like configure,
make, make, install stuff, you
know, unless somebody has written their make file wrong, but assuming that someone's put
the dependencies where they should have and everything, you can replace that make with
make space dash j and then the number of cores.
Oh, that's obvious.
Dash j for JSON.
Yeah, for jobs.
Oh, for JSON.
Yeah, indeed. number of cores. Oh, that's obvious. Dash J for JSON. For jobs. Oh, for JSON.
Yeah, indeed.
So you can have like eight Jasons in hamster cages just
like running away in parallel.
I want a JSON in my computer to compile my code for me.
Oh, that'd be pretty awesome.
That'd be a horrible job.
I want a JSON in my computer, too.
Oh, OK.
I don't know why.
That sounded really vain.
I would like a JSON inside of every computer.
Actually, I just want the argonauts.
JSON could stay out, but I need an argonaut in every computer.
Isn't that like a 1 and an argonaut 0s, like the biggest
number ever?
You lost me.
I think you went over my head.
I'm searching the Google now.
Yes, an argonaut is 1 followed by an argonaut 0s.
I'm totally making that up.
So you can do make-j8
for example, and it'll
automatically know sort of like
what depends on what, and it'll use all
eight of your cores. Wikipedia says
Argonaut is an ancient Greek civilization.
And I want eight of them.
Oh,
there is a sailor in Greek mythology,
Jason and the Argonauts yes indeed indeed okay
so sorry continue
oh man but yeah so you could totally make your uh make your makes blaze super fast make make
you can make your make makes um yeah and and also as pat Patrick was alluding to, there's disk CC, which is,
that's actually kind of a little tricky to set up.
So, you know, unless you're doing a ton of building,
you know, I wouldn't go that route.
Or you have a server farm.
Yeah, yeah, but if you,
or you want to use EC2 for that,
if you have lots of money.
But yeah, you could totally install disk CC.
It's like a wrapper around GCC.
And let's say you had, like, four computers in the house.
You could put DiskCCD, which is the DiskCC daemon, on all four of those computers.
And then when you did make, I think it's like, I forgot the flag,
but there's a way you can put into make where it will actually farm out your make,
which is pretty awesome. And you also won't have to heat your house. That's like, I forgot the flag, but there's a way you can put into make where it'll actually farm out your make, which is pretty awesome.
And you also won't have to heat your house.
That's true, yeah.
You can just heat the house with induction from your processors that are just on fire.
Or, like you said, if you're rich and you have a lot of money, instead of starting up this on EC2, you could just send the money to us and Jason will compile it for you.
Yeah, exactly.
There will be it for you. Ridiculous. So also, I mean, it's another layer between you and the compiler. And so that can kind of obscure things, which is great.
I mean, you want to have an abstraction.
But at the same time, it can kind of hide errors from you.
Yep, totally.
Yeah, I can't count the number of times that I've gotten errors.
And just I tried to compile some open source app.
And I get an error. And, you know, there might say, like, something really crazy.
Like, oh, can't find, like, some file with, like't find some file with 10 different sets of ellipses in
front, because make has stepped through all these
directories, and then now is referring to a file relative to
somewhere else that I don't even know of.
So yeah, it can definitely make things really hard to debug.
Because of all that, you end up with the one guy who you know
who's really good at this.
Yeah, exactly.
He's the only one and he helps
you put some awesome code in your make file that you do not understand and nobody else has either
and then eventually that person leaves forgets whatever and you end up with what i call in the
code black magic yeah that's the those lines of the code that you have in a lot of historic
legacy programs which nobody quite knows why they're there or what they do but don't take
them out or it will break. Yeah.
Yeah, I actually saw something in a makefile where it said, like,
error one is okay here, and then it returned two.
And I'm like, should I be worried about this?
The answer is probably yes.
So, yeah, fortunately, there's a lot of tools to sort of help you navigate the painful experience that is the makefile process.
Yep.
You know, one of them is automake.
Automake's very popular.
Actually, do you know anything about automake?
Like, I've used it a lot.
Yeah, same here.
Never used it.
Oh, really?
I've gone in and, like, because sometimes it tells you type automake.
Oh, okay. I've gone in and like, because sometimes it tells you type automake. And automake, it's such a complicated mess.
But automake creates the configure that then you have to call to create the make file.
Oh, man.
That you have to call make on.
Yeah, it's crazy.
I need to go take pain medicine.
Yeah.
Somehow automake is better than writing make files.
I don't get it.
But one that I have used a ton, and I swear by it, I think it's great, is CMake.
You know, I mentioned most of the good things about CMake with separating the variables and all that.
But CMake's a great one.
I've used a little bit of QMake for doing, like, QT apps.
Oh, okay.
All right.
That's where I've seen it before.
Yeah, yeah.
I think NMake is the one that Microsoft puts out.
Yeah, yeah. I've used that. So pretty much star make. Yeah, yeah. Ismake is the one that Microsoft puts out. Yes. So pretty much
star make.
Is there any character here? Make?
Yeah, exactly. You need a jmake?
Yeah, oh yeah, it should be the next one.
Argomake.
So, yeah.
As we mentioned, Ant and Maven
are tools. There's also premake
which is kind of
interesting because it uses Lua, which
we talked about in the last episode. Yeah. So you actually write Lua code that generates
the make files. And I've used premake. It's decent. I still prefer CMake, but premake
is good too.
Playing favorites over here.
Yeah, exactly.
So one of the things where they're kind of like, you know, sticking with our typical
outline, I guess, we're trying to come up with some uses.
We talked about, I mean, obviously to help build your file, that's the main use of a
build system.
But some things, you know, to kind of give you guys nuggets of inspiration, the things
to think about, things you may never heard about.
You may say, oh, this is old hat, Jason and Patrick, and like, oh, that's great.
But some of the newfangled things that young whippersnappers are using, you know, like
continuous integration, right?
So, you know, the idea that, yeah, you might be able to type GCC,
blah, blah, blah, really fast.
But, you know, one thing is that you might not type it
every time you make a code change or every time you push a change even.
And so more and more it's important, the idea of, you know,
building your system continuously with the code
that's checked into the repository.
Like what is it?
You know, is it is it? Is it successfully
built? Will it run the unit tests?
Does it have unit tests? Yes is the
right answer there.
Does it have system tests? Does it have end-to-end
tests? Does it have all these kinds of tests?
To put what Patrick
is saying more explicitly,
let's say you have Subversion
or Git or something like that.
You can actually write something on your server side.
I think it's called a hook, a Git or Subversion hook,
where every time somebody checks in code, it runs the make file.
And then it runs make test, and then it runs make system test.
This is perfect.
I just say a bunch of words, and then you executive summarize it for me.
I do need you in my computer.
I can write an email, and then you can write TLDR.
All right.
I actually only recently found out about continuous integration stuff
because that's something I hadn't been privy to until recently.
It is pretty awesome.
Actually, I got the email nobody wants to get,
which is the, oh, you broke the build.
You broke the continuous integration.
Yeah, you submitted code that now causes everyone else to...
But that doesn't happen if you have perfect unit tests and perfect peer review.
Yeah.
Which everybody has.
Of course.
Nobody ever makes mistakes.
No.
Yeah, yeah, definitely.
I don't. That's a lie. I can't remember last i do regularly i also have terrible memory the worst is i got an email
because i did this and i got an email not from my own team for breaking the build but from another
team who depended on our team oh those are the worst yeah then they're like hey hey what are
you doing and they like we are a little bit more sheltered in how we do stuff but
they have like you know they have to meet certain requirements or in the minutes like when something
breaks it's like a big deal for them and like i broke it nice so yeah i broke something and just
in a terrible twist of fate or coincidence um it happened to be the hour that they were cutting
like their release for the month oh and i just happened to break their stuff like, you know, only minutes before.
Oh, tsk, tsk, tsk.
Yeah, I actually got a phone call.
Like they called my cell phone.
Oh, wow.
It was not pretty.
You know, the alternative to that is like, you know, they cut the release
and then it's broken to the customer.
So still Makefile is incredibly useful for that kind of stuff.
And also, you know, for source distribution or package management systems,
so things that are going to hold for people on all sorts of platforms
and versions of the OS and all this,
and for them to be able to download from a common area.
So like Ubuntu software,
you go in there and say, I want more apps,
or I guess applications.
Here's my software.
I'm going to download it.
So they can get compiled for your system.
Sometimes they're pre-built.
Sometimes you can have the people build it themselves
so that it can be specific for their platform
and highly optimized.
Yeah, totally, totally.
Well, that's all I got for this week.
The fun topic that everybody loves of build automation.
But it is important.
And when it goes wrong, it goes wrong.
Yeah, I mean, I think many people who watch a show are still you know in
college or in high school and so I think that it's hard one person was in
elementary really no I don't know okay I made that up I was impressed so they uh
you know it's hard to sort of appreciate this you know build system and build
automation because a lot of times you're working solo but But you quickly find when you work with a team,
things as what Patrick mentioned were,
I had something recently where I was using
a different version of Java than somebody else.
And so my code work on my machine didn't work on theirs.
And so these kind of problems are just multiplied
when you use make files.
Oh, go ahead.
I was going to say, too,
the earlier you start learning
to use these tools, even if you are a solo team, even if it's
overhead you don't really need, but especially if you are not
yet working in the industry of software, software industry.
Wow, I said that poorly.
As long as if you're not yet there and you say, well, why
do I care?
I don't work on a big team.
I work by myself.
Yeah, yeah, but if you learn these things now, when you go
to work, it's going to be, people are going to think you're that much more genius
when you show up.
You get through the interview,
that you show up and they're like,
oh, we have this thing people don't know about.
It's called continuous integration.
You're like, oh, no, I used that on my,
you'll know about it,
even if it's not the same form,
even if it's not,
I mean, the ideas will be there
and you'll be that much more productive that much sooner.
And one thing I've noticed from looking at old code
is even if you're working by yourself,
if you go back and look at code you wrote, say, two years ago,
it might as well have been written by a different person.
So with that in mind, think of yourself as like a collaboration
with your other selves over time.
With your future self.
Yeah, exactly.
And so writing makefiles is a way to sort of immortalize your code
and hopefully keep it so that it builds a couple years from now.
Well, sorry for the slight delay in the episode.
We had some Skype issues last weekend, so we're recording this again.
But hopefully this is a great episode.
Hopefully you guys will enjoy.
Yeah.
Thank you again for all the reviews still coming in and the emails we get.
Yeah, totally.
And like care for you guys and gals.
Yeah, yeah.
If you guys have any questions about programming throwdown
or anything, don't hesitate to throw a comment on our G+.
Throw it down.
Throw it down.
Tell us what your favorite build automation tool is.
Yeah, suggest languages.
JMake.
Brownie points for all the JMakes.
I'm going to look that up.
No, it might actually be a real thing.
It probably is.
It might be a real thing.
It is a real thing.
Of course it is.
Java programmers compiling large projects.
All right.
Okay.
So I think that's all we got.
So that's a wrap.
Yeah.
Have a good one, guys.
The intro music is Axo by Binar Pilot.
Programming Throwdown is distributed under a Creative Commons Attribution Share Alike 2.0 license.
You're free to share, copy, distribute, transmit the work, to remix, adapt the work,
but you must provide attribution to Patrick and I and share alike in kind.