Hacker News new | comments | show | ask | jobs | submit login
Craft: A simple Minecraft clone written in C using OpenGL shaders (github.com)
578 points by sbjs 60 days ago | hide | past | web | favorite | 154 comments



Fogleman has some really cool side projects in a variety of areas written in a variety of languages... and I noticed he’s got two kids! As a new father, how is this possible? Really boring/easy day job?

Having a daughter is an amazing experience that is rewarding in its own right but something that really scares me about fatherhood is not being able to do any deep work for the rest of my life.

Doing deep work is another part of living I really enjoy and I’m somewhat petrified that I’ll never experience it again. Maybe it doesn’t matter.


Fogleman here. Funny to see an old project in the #1 spot (again?).

I hesitate to comment about this being productive while having kids thing, but some people seem to be implying that I must never spend time with my kids. It's far from the truth. A week ago my son (age 5) and I went camping in the backyard. Coincidentally, he and I have just recently started playing the real Minecraft together on our own private server - every evening lately. (I had never actually really gotten into the real Minecraft before, believe it or not.) We've been playing lots of Thinkfun games like Rush Hour and Shape by Shape. I actually still lay with my son while he falls asleep every night. My daughter (age 7) and I walked to the playground and played for a while there yesterday. We go out and check my vegetable garden daily, and my daughter likes to play "baseball" (plastic bat and ball) in the backyard with me. I work from home currently which is nice because there's no commute and I can see my kids a lot. We have "dance parties" in my home office where there's lots of open floor space. I could go on of course.

I fully understand the sentiment that time is short when it comes to spending time with your kids before they are grown.

There are plenty of folks without kids who aren't super productive too - so the whole thing seems a false dichotomy to me.

Frankly I don't even feel like I work that hard. Maybe "hard" is the wrong word. A lot of people are constantly busy and have no free time. Yet they don't seem so productive? I'm the opposite of that, somehow.

I know I'm under no obligation to defend myself - but there you go.


My personal guess is that most people need "warm up" time to make progress on their projects, the time needed to build up the mental model of the whole domain. This can go from hours to days to weeks depending on the person and the type of mental model. But some people have certain domains where they can just instantly build up that model in their head and immediately begin making serious progress. You sound like you're one of the rare ones that can do this for a large number of domains (3d algorithms, project architecture, database structure, feature interaction). I'm only like that with a few very specific domains and I suspect most other devs are like me in that sense, so we stand in awe when someone has that natural in-built capability. (I think this not only goes for making progress but also learning new concepts, as I have seen other graduate students who can blaze through certain things like Haskell where I struggle as through molasses.) If this theory is true, then you probably aren't spending more than 3-5 hours on projects like this per week, but you're making the same progress most of us would need 2-5 weeks for. Btw I'm the guy who posted your project and emailed you, thanks for coming here to answer our questions and thanks for making such a cool project and making it freely available for all of us to learn from!


I think that's a good guess.

I'd add to that, sometimes people could get going faster if they really tried, but they're just a bit lazy or burnt out and need a rest. So they say OK, I've finally got an hour of free time, but I'll just check Hacker News first, check my email, read this article... and now they only have 20 minutes of work time left.

Whereas a few people either don't need so much time to recharge, or they just push themselves into getting started anyway, and usually once you actually start working it's not so hard to continue.

Getting enough sleep helps a lot with motivation to work. Although then you have less time! So I'll just stay up late this one time and get this thing done...


Yeah I can relate to all this.. I need warm up time, and that includes updating social media and HN (like now), which I regret later. I'm one of those that have a daughter and feel they aren't productive at all and lack of free time to do cool, deep projects.

It also depends on what standards of productivity you aim for, and who you compare with. Many people say I do lots of stuff when comparing to themselves, and I feel unproductive 'cause I'm comparing to myself 5 years ago, working 14 hours/day.

I should try to get into The Flow faster (maybe leaving notes of what to do next when finishing a task? --and removing twitter and similar..)

Anyway, finding a good balance between family and work time is extremely difficult for me, one of my biggest endeavors, even after 3 years of parenthood.


When I first read this, I read it as a compliment to your productivity, but I totally see how you could read that as someone taking a shot at you. I applaud you for this, I read your gist, ran the commands and went from learning about it to using it in less than 5 minutes. Well done. My son loves minecraft, I hope to use this as a spring board to learning how games like this are made. He's 10 and has the aptitude to write code. I see projects like this and Im reminded I need to keep learning and that writing the same C# enterprise app code over and over again is the reason Im not "inspired" to have side projects anymore...


Totally meant it as a compliment and an honest question. I am in awe.


you may want to check out glowstone as well, it is written in Java and is being actively worked on

https://github.com/GlowstoneMC/Glowstone


+1 for Glowstone, highly recommended to anyone interested in running a server, one of my favorite projects of all time. A while back it was forked to add improved Spigot plugin support (in addition to Bukkit), later re-merged into mainline Glowstone, extensively under new development so it is worth checking out again for those who have tried it out years ago. Glowstone has a long history!

It even works well as the server backend for my NetCraft client, which is based on fogleman's Craft. The support plugin WebSandboxMC provides a WebSocket client for the web client to connect to, and it runs well on the Glowstone server, compatibility with Glowstone being a top goal.

So with these projects you can have both an open source client and server talking to each other, the full stack open source. The downside, of course, is neither are complete, but it is a start. Open source can only get better (contributions certainly welcomed).

Another project I'd recommend for those in the market for an open source server is Cuberite. It is written in C++ and supports plugins written in Lua. Also has a very active developer community, maybe slightly bigger than Glowstone. Last year I added Forge handshake support, so modded clients with Forge can connect send their mod list, while server plugins can register certain mods as required. Not full Forge mod support, but a necessary prerequisite. The downside of Cuberite is, without Java support, it doesn't have compatibility with Bukkit or Spigot plugins, so there is a vastly smaller ecosystem of plugins available, unlike Glowstone which can use many of them no problem.

Either way, both Glowstone and Cuberite servers, and Craft-based clients (shameless plug for NetCraft/WebSandboxMC), are very exciting and promising projects in my opinion. Personally I have not contributed to either recently, seeing this post I'm tempted to pick them up again, yet for better or worse I've moved onto other things. I'm certainly rooting for them to keep up their open source momentum, could turn into something very cool!


Thanks so much for creating these side projects, I've always admired the effective simplicity yet functionality of your code, especially Craft. Glad to hear you are as efficient with time management/life as your code :).

For anyone interested, last year I've taken fogleman's Craft and ported it to run in the browser using WebAssembly and emscripten: https://satoshinm.github.io/NetCraft/. It can be used with a Bukkit plugin to provide an interactive web-based interface to (a small section of) the world in Minecraft server. Have not worked on it recently, but could be a fun project to develop further, for all the open source contributors out there. I tried to merge most of the open pull requests and other forks of Craft, but life has gotten in the way...


I just assume that the 1-3 hours a night I find to watch Netflix and scroll Reddit is the difference between me and those who hit front-page of HN. If I consistently used even half that time to hack around and learn new things it would really add up.


So, what type of tinkering would provide equivalent reward to what you specifically seek from Netfix and Reddit?

Find that, and you already have the itch+curiosity+motivation+rationale+justification (mostly the itch) to just jump in somewhere.

[NB. Mis-typed Netflix, then left it in.]


But from a time management perspective... just how? I have one child (4) and work a day job. It's all I can do to find time to exercise and have an hour or two for myself at night. Do you exclusively program in your free time?


My theory is that when you have children the sum of time spent at work, commute, chores, exercise, child minding, sleeping is very close to 24 hours per day. So any decrease in the time requirement for any of those means a big difference in discretionary time. So no commute vs commute could triple your discretionary time. Then, amazingly, you can be three times as "productive" despite being in a very similar situation.


I can find the time but I don't have the mental energy. I've tried slotting in extra hours but it just doesn't flow.


That is absolutely true. I just went from remote back to office and have been trimming here and there to fit my workouts in.


Similar situation here, and I've done this oscillation from remote to in-office 4-5 times now. It's always a shock to realize how much time is consumed on the processes of being physically present in the office. After a little while, like everything else, you tend to forget. It's good to get scared straight periodically.


> I work from home currently which is nice because there's no commute and I can see my kids a lot

I'm guessing this is the fundamental difference.


If I were being pithy, I find that when you're doing this type of thing it's more a feeling of "working fun" rather than "working hard".

(Of course this means that one is probably not always going to do "production ready" things, but it's for fun, so it doesn't really matter. Sometimes it's fun to just go nuts and sprinkle "undefined"[1] all over the code base and just go from types to implementation as fast as humanly possible.)

[1] This is a Haskellism, but basically means any of:

    assert(false)
    throw new NotImplementedException(...)
    ???
    etc.


Most people waste hours and hours every single day on all types of mindless activities and wonder why they can't get anything done.


Just want to say: "Fogleman, you are my Hero :-)". In my last interview, when asked who are the engineers that have inspired you, I mentioned your name!

Thanks for all the inspiration, keep it up.

Aside, yes there are a lot of false notions going around and good to have engineers like you to prove otherwise!


Frankly I don't even feel like I work that hard. Maybe "hard" is the wrong word. A lot of people are constantly busy and have no free time. Yet they don't seem so productive? I'm the opposite of that, somehow.

You're literally an example of a "10x". I have a similar experience --- it doesn't feel like you're doing a lot, but the vast difference becomes noticeable if you compare. You can get more things done in a day than others can in a week. That's just your natural ability. Enjoy it.


Hey, thanks for sharing your perspective. Father of a daughter here (1y) and expecting one more in a few months. I was always wondering how I could keep doing my Arduino and Raspberry Pi hobby projects while growing up a child but somehow it works, even at a slower pace. Sure I don't have as free time as I had, but I find these rare moments in a week and I take advantage of them. Having a great, even full time, job also helps as I changed my last very stressful one that hogged my time.


So how do you pull this off? How much time do you spend in coding side projects? What do you do when your kids try to grab your attention during that time?


Still impressive.

Looks like you can focus well and have stamina.

How do you keep motivated doing such a project for fun in your spare time?

Do you work 40h/week?


Hi, I just looked over your github repos, the number of "high quality" projects is impressive. Great job!


I'm more interested in how you manage to be this productive. Any tips on managing time and projects?


Dude, that just means you have a really good thing going.


This is completely unrelated and orthogonal, but...

So far I have 18 b8 c4 23 86 1b 9c 60 f6 ec b0 (...11 octets...?), and I'm not sure what to do with them.


[flagged]


You could say that about anything.

You could spend an hour skimming stones on a lake with a kid and never talk to them and you wouldn't be 'spending time with them' in that sense.

Or you could spend an hour teaching them how to skim a stone, or the science behind why stones skim, or make up a skimming competition, etc.

The point being you can make anything you do into a bonding/learning experience if you try.


Minecraft is a wildly collaborative game. You are constantly talking, sharing and problem solving together. They could even be in the same room. I find it very hard to imagine that's not bonding just because it's on a screen.


What is the purpose of your comment? No one needs this. It must be to make you feel better? Don't make comments where the only point is to make yourself feel better. It adds no value.


Life is way more complex than an isolated study might lead you to believe. Read research, but be aware of its limitations.


Do these apply to all computer games? I can imagine this being true for, say, FPSes or puzzle games, but collaboratively building with Minecraft seems like a different sort of thing.

Are there similar studies about whether playing Legos with your child creates a bond? What about baseball?


Since my daughter was born, I no longer have free time for meaningful side projects.

She is almost 9, and I measure my free time in minutes.

What I do have is: - A great relationship with my daughter - A great relationship with my wife - A daughter who is kicking ass in every area of life, and is having a fun, enjoyable childhood. (Unlike my own) - I have not missed out on a thing. I have no second thoughts on my parenting. - I sleep great - Stress free home. - Homecooked meals everyday. (We both cook)

There should be tons of time in the future for me to go back to side projects. But the time I have to raise a family is limited.


It's truly a blessing to be able to have this kind of perspective. I think a lot of frustration with one's current situation has little to do with the situation and much more to do with the perspective applied to the situation.


Thanks for using that few minutes to find this spot to reply, and sharing the insight you did.

Now I just need to learn how to find myself in the little things. I think that's what I need to do in order to sustain motivation and engagement. Not sure though, still working on it.


Yes, this. Childhood is fleeting. It's a cliche that you can't really appreciate until there's a big disparity between the age you feel like your kid should be and the age they actually are. It's crucial to capture those moments. We should all do more to ignore anyone who implies that the time would be better spent struggling against a compiler.


This is a life worth living, thank you for the perspective.


> Maybe it doesn’t matter.

Having a few people pass on me the last few years, and realizing I missed my first kids early childhood from poor work/life management at my dream job, I don't think it matters.

You'll never eventually regret spending time with someone you love, but you may regret that writing <some program> made you miss out on that time.

Maybe I'm getting old, or just burning out, but my kids are quite literally disappearing in front of my eyes, slowly turning into young adults. Trading them for some cash and some now obsolete product/device seems less and less "worth it".

I'm not sure where that balance between myself, my kids, and money is, but it seems like a "pick two" type scenario, but in this case you have one short chance before the kids are no longer kids.


I've got 5 kiddos. I use silly traditions/rituals to bond with them. We play a nightly game of ball tag. We have a couple of foam balls we throw at each other for 2-5 minutes. Its frantic and we all love it! We've made up all sorts of rules (Calvin-ball style) to go along with it. Afterwards, I tuck each of them in, the girls want hugs and kisses, the boys say they don't, but I know better. They usually get wet raspberries if they resist!

Other traditions: Family Home Evening on Monday nights. (Rotate through the family members on whogets to lead a simple spiritual lesson. Even the 5 year olds get a turn and love being the center of attention.)

Friday night is movie night. Some cheesy Disney movie from the 80s fit the bill most of the time. Lately, the kids have been asking for the movie Bedtime Stories.

Sunday afternoons are board-gaming time. The kids pick the game.


Just wanted to say you sound like a great parent!


I wish my family had done more things like this when I was growing up. I love my parents but my main “fun memories” with them are one-off things from vacations.

One day when your kids want to remember fun times with you, they won’t have to try hard.


Recently felt this way. I looked at my 9-year old and thought of that tiny infant baby with a quivering lip and helpless cry. It seems like only yesterday he was being born.

Also had some friends pass as well. One good friend from work committed suicide. Workplaces have a way of forgetting all about you, and what you accomplished, but family (and friends to some extent) don't. It's human relationships that really matter in this life.

Don't miss out on your family for work. It may seem like a good trade, or simply what you must do, but in the end you'll regret the high cost.


She's not going to need quite as much attention when she's in elementary school, and much less attention when she's in high school.

When she is in high school, starting to pull away from you, I hope you can look back without regret about how you chose to spend your time.

In software development, we talk about context switching in humans like a cache that might take 30 minutes to warm up. But just as a computer has many levels of persistent state, so do humans. It's not a perfect analogy. And this isn't going to be what you want to hear. But speaking as a fellow dad, this is what I did and what I wish I'd done sooner.

Take your todos- your plans about side projects, open source contributions, everything to do with coding other than your day job- and evict it from your mental cache, put it in a swap file, archive it to tape. Keeping that stuff fresh in mind is wasting space that could be spent on what is needed now.

I have a stepdaughter, a son, and a daughter. I wish I could have been more present for my stepdaughter. I wish I could go back in time and hold my then-toddler son. At least I'm here for my daughter.

Years from now, all my kids will be grown up enough that I can work on side projects. As much as it would be cool to write a game or a programming language or whatever, I don't want that time to come too soon.


It is really hard to do deep work with kids, unless you have a spouse who is willing to do 100% of parenting and house upkeep, or can afford a nanny


The nuclear family concept of child rearing is awful. Humans did not evolve to raise kids in isolation from the extended family and the other adults of the tribe.


What's the alternative? Just have everybody constantly work and "time share" the kids between peoples shifts?

The nuclear family concept has its pros, it's also far from "raising kids in isolation", pros which these days are marginalized in favor of "alternative family concepts", but what all of them fail to address is the original reason why the nuclear family fell apart: Middle-class jobs can't support single income families anymore.

That is the actual problem, not in what constellations people chose to parent their kids.

As the economic pressure increases, more people from the family are forced into more work, leaving less time for the actual family and taking care of children.

In an ideal world work-load would have shifted, so both partners only work like half the time, leaving both of them time for family stuff. But that's not what happened, nowadays often both parents work full-time jobs and still make not enough to be able to afford a nanny, which would be an even worse solution.


Joint families a la Asian families. Grand parents live with you and help out with the kids.


But that does also not deal with the actual problem, it's just outsourcing parenting due to both parents having to work so much.

Imho that's the actual problem, solve that and you will free up more times for parents so the question of "What to do with the kids?" doesn't even come up in the first place.


I think the phraseology you've chosen here is confusing. Agreed 100% that multi-generational upbringing is the natural and ideal style, but I don't think that "nuclear family concept" is necessarily closed off or exclusive to other extended family members. Multi-generational living involves several "nuclear families" all clung together. It doesn't oppose the concept.


I have two young kids, one 2.5 years and one 10 months. I have a full-time job and a lawn that needs to be mowed every week. My wife and I split childcare and house chores pretty evenly. I still manage to work out 2 or 3 times a week, run semiweekly meetup, and work on a side project or three, and get a full 8 hours of sleep every night.

What I don't do is hang out in bars or watch sports on TV. You have a lot more time per week than you think.


good for you, not everyone is going to be lucky and have it easy, a lot of us suffer.


If you are a single parent or have a deadbeat spouse or need to work two jobs on your own or have special needs children, yeah, that's a whole other ball of wax. But what I'm trying to say is, this standard narrative that "having children is the death of side projects", without any other qualifier, is a woefully tired story that is really nothing but projecting one's own inability to be disciplined in their work on one's children, the people with the least agency in their lives.


I have a kid, a dog (that needs to be walked 2x per day), a fulltime job, I workout at least 3-5 days per week, and spend most of my weekends doing construction, but I still make slivers of time for my side project. (FWIW) :)


Do you plan ahead? Or do you naturally start working on them on a regular basis?


I have to optimize my time to waste as little of it as possible and try to create the largest coherent chunks so that I can ramp up on whatever I am working on and get something done. This often means taking care of the stuff I have to without any sort of procrastination (work, chores, etc).


We're expecting our first in December. Is it really like that? Don't scare me man, I have big plans!


When the kids are at daycare, you'll get 8 hours a day at work to do your work. One of the hardest challenges I had to overcome after becoming a parent is learning to get everything I need to get done actually done in those 8 hours.

But it's going to be hard, you'll have less sleep. Sometimes I stare at the monitor and my head is so cloudy I have no idea what I need to get done.

To add stress, your younger coworkers are going to be working 10-12 hrs a day, and will probably be more productive than you. You'll look bad, and you'll feel worse.

At about 3 years of age, things start to get better.

Of course that's when my second was born :(


As someone who probably qualifies in the "younger coworker" category, I'd be irritated if there was any level of expectation that I worked 10-12 hours a day, unless I wasn't working 5 days a week.


Agreed, and I've seen this elsewhere too. There's always this implicit assumption that people who don't have kids will naturally spend that extra time at work.

Work/life balance is important for everyone.


Let me clarify, not everyone in the "younger" group will work 10-12 hours, but those that have the option probably don't have kids. Those in the "high performers" category almost certainly exercise that option and work extra hours. There are obviously exceptions, but I think it's just that. An exception to the rule.

This is kind of the place where I'm at personally. I used to be the "high performer". I was always the go-to guy. I got there by working extra hours. Now that I can't work those hours, and I'm starting to meet my physical limits, I'm getting talked to about my performance.


I end up working ten hours a day some days, not every day, but I also work 6 days a week most weeks. My coworker with two kids works probably more overtime than me, usually 9 hours at least every week day then most Saturdays. His wife doesn't work or drive and his parents live with them and don't work or drive. He ends up spending just about all his free time running his family around to different appointments and things. I honestly don't know how he stays so cheerful all the time.

He's only about 4 or 5 years older than me(I'm 30). But, that's what the culture's like where he's from though I suppose. He's been here for about ten years and spent just about all his time working to bring his family over and then support him. He impresses the hell out of me, though, i'm glad I don't have to do that.


> I end up working ten hours a day some days, not every day, but I also work 6 days a week most weeks.

Why? Do you like this?


Sometimes I do, and the overtime pay definitely helps. There's a few reasons. We have a schedule to maintain. We have a certain number of jobs that need to be finished every day, if we can't finish everything we have to stay. Right now there's only me and two other people properly trained to do our jobs and each of us work in different sections. One of the jobs is manageable by one person, my job and the the other guy's job are two person jobs.

Right now me and one guy have a couple new guys helping us who don't really know what to do and can't really be left to do a lot unsupervised. Each of us also relies on the person before us completing our jobs on time. I'm right in the middle of the process, so if I don't finish everything I need to the people that come after me have to work even harder to finish everything on time.

If we're even a couple hours late for a job, customers complain, contractors cancel jobs and the boss is unhappy. I personally don't like burdening my coworkers more than I have to and honestly we do high quality work, I like knowing my work is well done.

We're a small place, we all work together to get things done. The boss puts in his time with everyone he's probably the last one to leave at night treats his employees well. Anything we need anytime to get our jobs done he'll get it for us right away, if we've ever got problems in life or other things he's understanding and tries to accommodate or help out as best he can, they've taught me so many things since i've started here and everybody was patient while I learned and at this point the shop relies on me to be there to do my job.

Oh and my boss is one of the few people I know I can honestly say is a hero. He rescued is family from genocide by the Khmer Rouge in Cambodia in the 70's when he was in his 20's, escaped to China then brought them all to Canada and started his business with nothing. So the way I see it, I can't really complain to much about having to work hard or long hours, i've never had to deal with watching my friends and family get lined up and executed with an axe to the skull.

And honestly, I just enjoy my job. I get to make things everyday, I program, I do physical work, operate and maintain giant machines, I get to be creative and i'm pretty much left to do whatever I want as long as i get my job done. Plus it's pretty cool to work making things from one of the earliest materials shaped by humans.


If your boss is regularly expecting you to do the work of two people and consistently work overtime to do so it doesn't sound like he is a good boss and looking out for you.

The fact that he works longer hours than anyone else isn't justification for this. As the company owner his decision to do so is an option he has chosen and the benefit he gets from do so greatly exceeds the benefits you get from doing so.


Even with two people the way the schedule ends up you still need overtime. The thing is, the boss can't just start turning down jobs because we lose staff, if we can't do it we won't have jobs. It's not because he's a dick and wants to work us to death, it's because in order to maintain his business he needs the revenue. If we start turning down jobs our customers will go elsewhere. We've already had a few of our big contracts get cancelled because we can't keep up. It's the way the business works.

You have to work around the schedules of other contractors and professions and if you don't well, your company doesn't get jobs. There's a lot of competition in the industry. He doesn't expect me to constantly work overtime, I won't be fired if I don't, i've been told any time I can't it's ok, i'm never told I have to. I either make the decision to do so myself so the next day will be easier or i'm asked if I can.

I've never gotten in trouble for saying no and there are days where we're slower and there's not much to do. We don't get shit for taking it easy on those days or when we're standing around chatting when we have nothing to do. I personally work as hard as I do because I know I capable of it and it'sy job. I'm being paid to get shit done, when i'm at work i do what i'm being paid to be there for.

I haven't always had to work by myself. There were others doing my job when I started, one became the manager and has pretty much forgotten how to do my job. The other one first got moved to a different position outside after months of not being able to learn this job, eventually he got fired for fucking around too much. I was by myself for a few months after that while they kept trying to hire people who would either stay or actually work when they showed up.

I ended up getting a friend of mine a job with me and she did well at it. She was here for a year and a half before she had to leave due to health and overwhelming life issues at the beginning of this year. Since then i've been alone we hired one guy a little while ago, turns out he was just interested in things like where the security cameras were, which doors get locked at night, how much everything was worth, needless to say he didn't last long. The guy working with me now's been here a few months, he tried a few of the other jobs in the shop but the other people that work here weren't big fans of his work so for the last couple weeks he's been helping me. He's been picking things up, but there's a lot to learn and it takes time which I have to find in between doing my job. It's the kind of thing where a tiny mistake can cost thousands of dollars.

It's just kind of how it is, i'm in a fabricators facebook group. The top complaints from just about everyone is the lack of quality employees. Finding people willing and able to learn as well as being willing to work is difficult.

I dunno, everyone I work with is pretty dedicated to the shop and everybody else there. We like doing a good job. We like knowing our work is respected and valued. People are happy with what we make and we do things other people can't do. It feels good working hard in a place like that.


If he has more work than people the options aren't to regularly expect your employees to work overtime or turn down work. The answer is to hire more people. After this many years in business the owner should have a handle on his turnover rate and should be staffing appropriately so that loss of an employee doesn't leave him severely understaffed for an extended period of time.

If those in your industry are finding it hard to attract quality employees then it is likely that your industry is not offering the proper compensation to attract those employees.


>When the kids are at daycare

If you can afford daycare


We have two and my wife is lucky enough to stay home with them (and not need daycare). One thing I didn't account for is the load parenting all day places on the spouse staying home. In a perfect world you could share the load 50/50 after work, but on good days it's probably 60% on me to parent in the evenings. A bad day can mean I'm 100% on parenting duty.

I'm sure everyone's mileage (and relationships) differ here.


This is very true in my family as well and seems seldom talked about. I've been on both sides of it because I work M-F and my wife works Saturday. If we can get out to the playground or something it's lovely, but on a bad day stuck in the house she can't come home soon enough and I am done.


Children, big plans, or sleep. Pick two.


Children are big plans. You don't get to pick sleep, and you don't get any other big plan.

Fortunately Children for all their work are rewarding. You won't grow as much at work. However you get to see and do many interesting things in return. If you are lucky you can get your kids interested in your hobbies (this isn't that hard)

One reason to never become CEO: they travel 200 days/year and thus don't get to see their kids much - at less than $10 million/year they are grossly underpaid for the time away from family.


From my experience having children and sleep isn't even always an option ;)


One is a lot easier than two


It takes a toll, but it's worth it man. Drink a lot of water!


Kid IS the big plan then!


Grandparents are the best babysitters!


I've got twin 3 year olds. Took a while to accept the fact that I have no time to do "things" anymore. And like another commenter, I measure free time in minutes. First time I got 30 minutes to myself (9 months into parenthood) I nearly wept.

I'm at a point now that I'm happy to spend time with them and, after numerous false starts (that were crushed by repeat month long illness moving from person to person, random sleep problems/night terrors lasting weeks, etc) have abandoned all outside aspirations. And I'm ok with that.

I do suspect things will lighten up in time. Perhaps I'll entertain side projects one day in the future.


my money's on him spending an hour or two every morning or evening, when the family are still in bed. I've learned recently how much more productive you can be by spending small time consistently compared to large time inconsistently (ie starting new projects full of excitement).


Having a daughter helped me to learn how to be productive in 15 minute chunks, rather than needing a block of hours to “get into the zone.” It’s a skill like any other—learning to work productively without the zone.

This is probably also why open offices and a afternoon peppered with meetings doesn’t bother me. I don’t need 30 minutes of quiet just to ramp up and start working on something. Thanks, fatherhood!


Any tips on how to do this, as a new parent I am currently struggling to go from my mindset of needing to get "in the zone" and its been a very hard transition.


I wish I could give you a formula. It’s mostly aimed at eliminating distractions and keeping problems fresh in your mind. Some things that help: No phone notifications, put it on mute or better yet leave it in another room. I turn my phone completely off when I get home from RealWork. Don’t open your web browser (no distractions). Bare, dedicated work desk. Headphones if in a loud environment. Keep your next problem in your head, even when away from work desk. Lots of “family time” stuff is low-mental-bandwidth. Play tag, make a pirate hat, stuff like that. I’ve always got one or two project problems I’m mulling over in a background process. Keep a pen and notebook on you to record insights while away from work desk. Sometimes I’ve got it solved while helping daughter brush her teeth and all I need to do is sit down and type it in.


Thanks, this was very helpful.


Fake it until you make it. Just like any other training, you have to practice your goal of quick focus before it becomes habit. If you practice taking 30 minutes to get "in the zone" that is what your brain is going to expect. Having kids will help with fast context switching.

Also, if you watch TV, stop. There is way more time to get things done if you don't watch TV.


The only thing I've learned is how to go to sleep quickly. Pre-children it took me easily an hour to fall asleep now its minutes, tired or not.


Being constantly tired and sleep deprived will do that!


It takes me an hour to even ramp up with all the context for anything of value... color me impressed.


As someone who also does side projects with 2 young kids, all I can say is you get used to optimising your free time. You might be working through a problem while you sterilise bottles or other chores so that once you're sat down in front of your code editor, you can hit the ground running.

A few tricks I've found:

* Don't commit stuff to memory. Write notes, eg use githubs issue tracker. So you spend less time retracing your steps

* Get used to working without spending half an hour restoring your environment. Whether that means you just Dev in a simple environment or use an IDE which supports workspaces, or you just sleep / hybenate your PC each night. Essentially you want to maximize your device time. To that end it also helps to rationalise your codes directory and class structure.

It's a bit like working on projects with larger teams, because you cannot guarantee how much you'll remember (nor even how awake and switched on) when you next get dev time you then have to treat each next session as if you're handing over a project

That all said, be flexible too. I break the above rules as often as I follow them. Sometimes I curse myself for it but sometimes it's just not practical to follow a process (time constraints or whatever).


I'm fairly new to this process myself but I'm finding the trick is to keep your designs extremely clean and easy to mentally model using types you can reason about. Then your software's features can emerge as interactions between "systems". That way (along with many other benefits) there's less to remember as you start coding. I find this post from the other day explains the principle better than I can: https://danshumway.com/blog/design-is-implementation/

[edit] not that that is necessarily how Fogleman does it. It just helps me.


My son get's up at 6am, i'd have to get up at 4am to get 2 hours of productivity in the morning.


I don't know how old your kids are, but if they're younger than 3 it gets easier. Never is extreme, you will surely have time for side projects at some point, but if you really care about it make it a goal to be part of your working day. That could be by expanding the scope of your current role, or cutting your working week to work for yourself a few days a month.


I am one of those people who is very productive with side projects. I operate a YouTube channel and website and I design 3D printed robots which I am building all the time.

It does take a lot of energy. People often are surprised I can do it, and say “ah you must not have kids”. Which is true, I don’t have kids.

And I know that having kids means devoting a significant amount of your attention to them.

Still, I feel like I will continue to crank out new projects even once I have kids. I’m sure my time spent on those projects would drop, but I doubt I’d stop entirely.

I have friends who have no kids who don’t work on projects like I do. I think some people are just wired to churn and others aren’t. I have a friend who struggles to get much done on weekends, while I am kind of non stop moving. I think it’s a personality thing.


> I am kind of non stop moving. I think it’s a personality thing.

Yeah, I know people who are like that... I'm not one of them. I certainly can get obsessed with an idea or project and go nuts on occasion, but a lot of time I like to "just chill" on the weekend. Play some computer games and guitar, go on a bike ride or hike, etc.


I have 2 kids. They go to bed at 8:30. I stay up until 11, which leaves plenty of time to do my own stuff. I am usually too tired though and watch movies. Plus I still need to pay attention to the spouse :) But occasionally I work on my side projects/ideas.


he works at formlabs, which doesn't look easy and DEFNLY doesn't look boring!

he also does carpentery and neat plotter art.

pretty impressive guy. very inspirational!


I have an 8 month old and I'm more productive now than I have been in ages, both in terms of side projects and day job.

My wife and I both stay at home and split baby duties roughly 50/50; we alternate nights, then split the day pretty evenly. We also each get one day a week that is free of baby duties, so we can relax.

I usually tend to use her naps as an opportunity to work on side projects, so I get a good solid 2 hours or so every day, plus any time I take after she goes to sleep for the night. These bounded, contiguous blocks of time focus me in a way that I find very helpful for productivity. I'm getting a ton done, spending a lot of time with my kid, and loving it all.


It sounds like you have a very flexible day job.


What I find is really helping is if one of the parent is at home. You can do so more things that way during family time and personnel time. Oh sure you say goodbye to restaurant, travels and other "expansive" things, but it's really crazy how I prefer that lifestyle.

It helps that I commute too so I have some free time for leisure, so back at home I don't need/want to pass as much time on "wasteful" activities.


Well, he only has two. I have 1.1 decachildren. Most blokes don't have more than ten kids, but if we need that extra push over the cliff...Eleven. One louder.

I managed to be an open source contributer with kids. It slowed down shortly after the 4th and 5th kids (twins) were born, and it mostly stopped when I got to about 7 kids. I maintained Linux's procps package, added Tux Paint features, helped with the OLPC XO, did some Linux kernel changes, and other minor stuff.

I wouldn't say I have a "Really boring/easy day job", but it does offer flexible hours and no expectation of going beyond 40 hours per week, and my commute is only 3 minutes by car or 15 to 20 by foot. (the job post: https://news.ycombinator.com/item?id=17442484)

It helps to be in a place with low cost of living, so only one income is required. That gains back some time.


Times when you will have plenty of time will come back fast. :( Kids will start to play more alone or with friends, less with parents, soon they will also grew up, and you will remember the days when you were everything for them.


I have found that long hours at work or work that makes you very tired (or is very engaging) are bigger obstacles then kids. If the day job is easy, then you can have own projects in the evening. If the day job is tiring, then you cant.

Kids require your time, but if you share duties with spouse, that alone does not make out-of-work projects impossible.


Programming can be very relaxing, you forget about the real world for an hour or two. If you have children you can take turns. And let the kids get used to fall asleep alone, it will feel like torture at first, but when they get used to it you will get an extra hour of free time every evening.


One of my professors would work two jobs, have two kids and do a major amount of side-projects at university.

He told me his secret was that he only needs to sleep 5h a night.


For folks who want something a bit less pedagogic and more fun to play as a game, I highly recommend Minetest [1] which gives you a programmable layer on top of the base Minetest engine to make Minecraft-like game modes.

[1]: http://minetest.net/


For those interested in the educational part (as with minecraft) there is an article about using it in schools: https://wiki.minetest.net/MinetestEDU


Thank you for pointing out this article. I am going to be teaching my kids to program and recently installed lord of the test so that we could have an interesting environment to work in.

For other's interested, minetest has a channel [1] on freenode where you can connect with the community in realtime.

[1] #minetest


Reminds me of spending countless hours messing around in ComputerCraft. So much fun.


I actually compiled this project to Emscripten a few years back:

http://s3-us-west-2.amazonaws.com/ingame-data/emcraft/game.h...

Here's the code: https://github.com/louisstow/EmCraft


My 5 year old kid is addicted to minecraft and there is no way to prevent violence (you can always keep killing animals even in Creative + Peaceful mode). The problem is that 5 year old have little context on consequence and they really get intrigues in exercising new power they have. I'd like a pre-schooler mode which actively discourages any violence. May be if you try to kill something, an alien would descend and take away all your assets. So only thing you can ever do in Minecraft is just build something :). If someone can add this feature, it would be AWESOME!


If that sort of thing bothers you, I'm not sure it's possible to make a version that totally avoids it. Even breaking blocks is "enjoying destruction". I certainly enjoyed smashing all the bricks in Mario when I was little.

That said, I suspect most 5 year olds can figure out that virtual cube pigs aren't real, and that there's no consequence to punching them with virtual cube arms.


You might want to try the free game Minetest [1]. It is very similar to Minecraft but the basic version, minetest_game, has no animals. You can add mods that give you animals if you want them but they are not necessary. There are hundreds of open source mods to choose from or you can write your own mods in Lua. I learned Lua by examining the mods that come with the game and changing them. You can play in a mode where you can't take any damage. Multiplayer games can enable or disable PvP.

[1] http://minetest.net


On Zelda you have little incentive to attack the Cuccos (chicken).


MineCraft also has incentive: you get meat when you kill animals.


Fogleman also have awesome Minecraft-clone[0] in Python/pyglet in just 900 lines of code.

[0] https://github.com/fogleman/Minecraft


This is very cool. I got it build/running in < 3 minutes in Linux.

My boy love Minecraft. I like to use this as base to teach him more about programming.

Any suggestion on small projects that can be addon / mod use this code as base.

I am thinking a series of coding exercises that can be hack/add on to this:

Add a command/mod to:

1) Draw line, Square, Triangle. 2) Draw Circle, Ellipse, Cone, Cylinder 3) Build Car, Airplane 4) Build Space Ship 5) Putting picture of his own face on the block.

... Any other suggestions?

Each small projects take about 1-2 hours build on skill sets that learn before. It should be simple and fun to do with goals of encourage kids to learn programming.

My boy finished all the CS classes in Khan Academy and seems to enjoys them.

If anyone else has strong interested in this, I will see if I (we - group of us) can develop this as a new Khan Academy CS class and contribute it to KA.


Try running server.py locally.

Then check out builder.py which will send commands to your server to change blocks. You can rapidly build all sorts of shapes with a few function calls.

https://github.com/fogleman/Craft/blob/master/builder.py


I really want something like that for vanilla minecraft. here's the closest I've come: https://github.com/HalCanary/mc-labyrinth


Very cool. The beauty and draw of Minecraft have always come from the way it emerges from such simple elements. Reimplementing it in any language would be quite fun, I'd think. It's almost the new Doom.


As someone who built a Minecraft-like project (but I was careful not to call it a Minecraft clone because it was missing many core features) in JavaScript several years ago and a fan of actual Minecraft, I feel I need to say something.

This is not a Minecraft clone. 99% of the projects out there that claim to be Minecraft clones are not close enough to be called clones either.

The real draw of Minecraft comes from a number of core features, most importantly the crafting and the survival needs that motivate the crafting and building. Minecraft would not have become a hit if it was just a creative sandbox alone. This project has neither of those aspects of the game. Another thing missing is the diversity of biomes. And another thing-- all of the underground features like caves and mines are missing.

So it doesn't have Mine or Craft, don't call it a clone. You wouldn't call something an IBM clone if it was missing core features of that computer.

I think people do the part with just the blocks and rudimentary generation and call it a clone, it's almost like they are giving themselves credit for recreating Minecraft when they haven't even implemented 1/3 of the features, and they didn't even recognize the most important ones.


>So it doesn't have Mine or Craft, don't call it a clone

It does both of those things. You can mine blocks for resources and then make new blocks out of those resources.

Your other points may be relatively salient, but a beta/alpha clone of a game does not have to implement every feature for it to be a clone.

It seems like you've taken this too seriously and really did not need to say anything. It's not really a productive point.

Say you've managed to brow beat OP down to calling his clone something like "A Minecraft-esque Resource Building Game." What have you done, at that point? Nothing. Calling something a Minecraft clone might be sensitive for you, and others, but it does not automatically make that sensitivity valid in any sense just because you feel it.


> The real draw of Minecraft comes from a number of core features, most importantly the crafting and the survival needs that motivate the crafting and building.

Minecraft became big way before survival. I remember playing for hours on Classic just building stuff with unlimited materials and talking to random people about their buildings.

Just go to any creative mode server and you will see that crafting/surviving is just a minor part of the game.


> The real draw of Minecraft comes from a number of core features, most importantly the crafting and the survival needs that motivate the crafting and building.

Playing on my own, I thought the same thing. But then a coworker hosted their own server and we had probably 12 people playing on the same map. It was amazing what each person was doing. Some built elaborate structures, some farmed, some raised animals, some cleared caves/mines. One guy would just dig - long straight tunnels, he mostly banked all the stuff he mined. Watching my young nieces play the game (not on the server with my coworkers), they simply enjoyed the free-form creative mode.

The glory of Minecraft is that it's so many different games to so many different people. If you like the survival aspect, that's great, but that's not how everyone plays the game.


I didn't realize there were major features missing from this version, and I understand your desire to defend the integrity of the hard task you did yourself

But also, this is just a cool project, and you could probably stand to chill out a bit and just enjoy that fact :)


A great place to find stuff like this is r/tinycode[0].

[0]: https://www.reddit.com/r/tinycode/


I actually found it here

https://github.com/uhub/awesome-c


I don't understand how 3d games are written or know what shaders are, so this is complete magic to me, and I'm surprised it's only 5k lines of C code!


Shaders are basically transformations performed by the graphics card. Or sometimes not. It gets real vague at times because like a lot of things there are no hard lines.

You take a point and figure out if it needs to be colored differently based on certain criteria. Like if it was in shadow, or if it's being hit by a bright light, or you just want a sepia tone across everything. You can even shift everything. Take the screen and distort it according to some kind of function. Like make it all wavy.

3d games are no more or less conceptually different than 2d games in a lot of regards. There are more things to track and be aware of, but you're effectively doing a lot of the same things.

If you've ever messed around with making 2d games, you can even begin simple experimentation by just making another layer of depth. Like LittleBigPlanet, it's ostensibly a 2D game presented with 3D graphics. But it allows you to shift between 3 layers to give you some depth.


> Or sometimes not.

No, shaders are always done by the 3d card =)


No, he's right. Shaders exist at the graphics API level, and while they're designed to be run on dedicated GPUs, they can be run on CPUs, too. Chrome, for example, ships with a software rendering fallback, which ensures WebGL shaders can run even when a GPU is not available.

https://blog.chromium.org/2016/06/universal-rendering-with-s...


I wanted to be careful because shaders don't really just shade anymore and I was pretty sure if I limited to just graphics cards, there will be someone that pops up that says the first shaders were actually blah blah blah.

Basically, I knew I was going to be slightly wrong about something somewhere.


I think you're right, actually. There are occasions where you use a feature that's ostensibly supported, but it needs to be emulated by the driver in software (I think geometry shaders might have been this way on some OS/hardware combination). This is where some of OpenGL's reputation for fast/slow paths comes from.


It backfired ;)


C'est la vie.

I mean, effectively anything you can do with a GPU shader, can be done by the CPU, so it seemed reasonable to me that you could make something functionally equivalent for the CPU and call it a shader.

It started feeling like the difference between "programming language" and "scripting language" in my head.


Does this mean you effectively get it "free" in terms of CPU cycles, and can use the CPU for all 16ms (60fps) of each frame to do game logic, without worrying about render time?


It's best to think of it as a real limited thread you can shunt off some of the work to.

Effectively, a shader is no different than any other bit of code you have. Anything you can do in a shader you can do on the main program thread (and vice versa). Now, things you typically want to do with a shader are better done by the GPU for various reasons. Better floating point math processor, pipelines more suited for the task, etc.

And you can make the shaders generic enough to reuse for multiple applications. Basically the shader says "Hey, here's where the light source is, here's the luminosity, here's the color, here's what it is shining on, here's how the color changes."

And being essentially dedicated number crunchers, people realized that not everything sent to a graphics card needed to actually render. You could make a shader to do something crazy, like solve complex equations more quickly than a generic CPU could. So if this was 8 years ago, you might decide to write a shader that could effectively mine bitcoins. Which is what people did and why good graphics cards have become crazy expensive.


Yes but you still have CPU overhead in terms of organising and submitting work to the GPU. Although some of that work is itself making its way to the GPU now compute shaders are widely supported. There will always be a need to synchronise though. The other big change in this regard is with newer graphics APIs allowing the work on the CPU to be properly multithreaded.


Drawing cubes is basically one of the first things you do when starting with 3d rendering. Shaders are scripts that the GPU uses for translating your input (a cube in 3d data and your 'camera' and some more vectors) to viewport/screen coordinates. You can do a lot with it [0].

The classic OpenGL 1 framework had no shaders and a static pipeline. Its straightforward in doing things but reduces the amount of fancy things you can do. Maybe check out a guide like here[1].

[0] http://www.adriancourreges.com/blog/2016/09/09/doom-2016-gra...

[1] http://www.glprogramming.com/red/


Interesting choice of sqlite, what's the story on concurrent updates these days? Last I tried to use it for a project was in 2009 and even at a measly 3 concurrent people, sqlite had trouble with data lock errors.

How does sqlite mesh well with Craft multiplayer?


I'm working on a Modded Minecraft series using AWS

If anyone has an interest in playing on my server ping me. We could use a few more players.

https://medium.com/@andrewbrown_78670/2018-modded-minecraft-...


is there a realistic mining/digging simulator? I love minecraft but sometimes I wish I was digging a real mine with buttresses


Yeah, it's called Primitive Technology. https://youtu.be/VVV4xeWBIxE


dayum dat RTX ray tracing is real


This has a much brighter future than Minecraft on Linux or Mac (completely neglected after Microsoft acquisition).


I'm assuming this runs about a jillion times faster than actual Minecraft? They should re-write minecraft like this; its performance has always been so awful.


They did. These days “Minecraft” officially refers to the new version, while what you are talking about is called “Minecraft: Java Edition”. As of now, both are maintained, though people are afraid that Java Edition is being phased out in favor of the new one. Main reasons for people preferring the Java Edition is modability and availability of an official server software for self-hosting.


I fondly remember looking through this a few years ago as it was one of the first posts I found at the top of HN


The screenshot is an infuriatingly aliased image, wouldn't it be easy to fix?


That repo hasn't been updated in years. I doubt Michael is going to be up for correcting an image in a defunct repo.


I didn't notice anything off about it. Looks normal to me.


I am in awe at how the executable is less than 1mb to download.


Can microsoft come after him for this?


They could sue Github's parent company for hosting it.


Lol




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: