Taskwarrior, where have you been all my life? - <AUTHOR> https://blog.djy.io/taskwarrior-where-have-you-been-all-my-life/ <comment><USER2> Google essentially implemented FollowUpThen and Taskwarrior in Inbox via snoozing and reminders. I can honestly say Inbox has significantly changed my life. I have to use email every day already, so overlaying task management has been a huge boon. I have a recurring reminder every Sunday night to take out the trash. I set up reminders to go off in 1 year (like when I sign up for something and don't want it to auto renew). I basically setup a reminder for everything I have to do. And since I have Inbox open all day long anyway, I never forget anything anymore.

Hey Google, thanks for making Inbox!

<comment><USER3> I was searching the comments for someone saying this. Snooze / archive to achieve inbox zero is life changing. I have one simple rule. If I can't do something right now, I snooze it until I think I will be able to deal with it.

The knowledge that it will not be forgotten is very cathartic and my inbox doesn't fill with emails I intend to deal with but haven't yet.

I think what people forget is that time is often a better folder system than folders, as it doesn't place the responsibility to check again on the user.

I've tried to evangelize and I can't understand why it hasn't resonated as much with others.

<comment> yjftsjthsd-h > I've tried to evangelize and I can't understand why it hasn't resonated as > much with others.

Perhaps it's a trust thing? It only works if you're 100% sure that a snoozed email _will_ come back every time and no later than you told it to. Is it reasonable to trust Inbox to do that? Probably, but people have to be convinced of that. And note that for some of us, trusting the magical AI- enhanced black box that Google tends to build is a little on the hard side.

<comment><USER4> I don't think it's that at all. Truly. I think it's a trust thing of the opposite sort: people don't trust themselves to comfortably (and actively) forget non-critical tasks, which is what the OP does with this method. I think lots of folks keep things in their inbox because of two reasons: 1) removing them feels like loss, and increases risk of ultimate forget, and 2) you can't effectively set a reminder for something you haven't actually read and understood, and most people don't even read the majority of the mail they receive.

<comment><USER3> On number 2, that's not entirely true, you can be like "I'm not reading this now, I'll snooze it until x when I'll go through some emails"

For me it's all about reducing noise level and cognitive load. It's made me a lot more organised, although occasionally I keep pushing things back and won't admit that I'm not going to do them because I feel like I should do it today but I probably ultimately won't. Curse my fallible humanity!

<comment><USER5> The "snooze hell" is extremily unproductive if you ask me. Quite often I end up creating an avalanche of reminders just by snoozing/deferring individual tasks until "later" instead of deciding when/where to actually perform the task, so I can continue focus with whatever feels more inportant at the moment...

Oh, brain :-(

<comment><USER6> I've found "If you can do it in less than 30 minutes, just do it now" to be very helpful in avoiding that

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> While technically awesome I've tried using it several times but always end up dropping it. I find it difficult to maintain and over time it's left to rot until I finally give up on it.

For me I don't actually need the complexity. A simple text based todo list would basically do the same job. The main issue is actually maintaining it.

This is why I like habitica more: [https://habitica.com/](https://habitica.com/)

It's basically a gamified todo list which is perfect for me.

It's also awesome with helping establish new habits. The incentive of not wanting to break a streak is surprisingly strong. Nothing else has been remotely as successful.

<comment><USER8> I find a physical notepad and a pen to be perfect for prioritizing and recording to-dos. Not sure why it needs to be "optimized" any further.

<comment><USER9> Agreed. I thought it would not be the case but I've been bullet journaling for about 6 months and it's been revolutionary.

<comment><USER10> On Mac, NotePlan does a decent job of distilling out the most important bits of bullet journaling--searchable markdown-style tasks and notes arranged on a calendar, with a bit of sugar to allow moving tasks from one day to another. It's very lightweight but has replaced my homegrown rapid-logging.

</comment></comment></comment></comment><comment><USER11> I use taskwarrior, and it makes my life better.

Two things I wish I could configure it to do (stating here in case someone already knows how):

1) A view that surfaces only the next task for each project, with a little annotation like:

      Write chapter 1 (First Novel)
      Make grocery list (Juliet's Party)
      Collate transactions (Month-end reconciliation)

Without that culled list, a comprehensive task-list is overwhelming.

2) Integration with a calendar (Google Calendar, etc.), where adding events to the calendar automatically adds them to Taskwarrior.

Thank you, Taskwarrior team! ( I was about to ask for a donate link, but I finally found one. Thanks :)! )

<comment><AUTHOR> Re #1, my strategy is to make `task ready` my "home base" of sorts. `task ready` shows you only tasks that aren't blocked or scheduled for the future. In other words, tasks that are ready to be done ASAP.

My daily flow is to try and clear my plate, i.e. reach "Inbox Zero" with my `task ready` view. Every task in that view needs to either be completed or rescheduled for a time that I think I have a chance at completing it.

As for projects with tasks that block other tasks (e.g. write chapter 1 is "next," and it is the blocker for anything else, like writing chapter 2), you can tell Taskwarrior to hide them from your `task ready` view by using the `depends` property. For example, if "write chapter 1" is task 42, then I might add a task like `task add 'write chapter 2' depends:42`. Until I mark task 42 (writing chapter 1) as done, "write chapter 2" won't show up in my `task ready` view and I'm free not to think about it.

</comment></comment><comment><USER12> I use taskwarrior daily at work primarily for its dependencies and recurring tasks.

For example, when I pick up a case to work on, I'll immediately add it:

        task add project:team.kanban case-1234 Add the frob

Then as I inspect and think about the parts that need to be done, I'll add a bunch more pieces as sub-projects:

        task add project:team.kanban.case-1234 Query backend for the data
        task add project:team.kanban.case-1234 Send ajax call/store in redux
        task add project:team.kanban.case-1234 Add to UI
        task add project:team.kanban.case-1234 Use the new widget for filters
        task add project:team.kanban.case-1234 Make filters work

Then I go back and decide which pieces here I want to do before the others. If, in order, the above tasks were IDs 1-6, then:

        task 3 modify depends:2
        task 4 modify depends:3
        task 6 modify depends:5
        task 1 modify depends:2,3,4,5,6

So at this point, only tasks 2 and 5 are unblocked and can be started on. It externalizes the state of the case, so I don't really even have to think about what to do next (hence the name of the default report, "next") or how far done I am. A good way of thinking about how I choose this breakout is, what could I commit without breaking the build?

If you also use vimwiki, there's another plugin that works on top of it called taskwiki [0] that lets you use use a taskwarrior filter to show a set of tasks in the wiki, that auto-update. It even shows dependencies as indented todolist items (though the above example wouldn't work because tasks 2, 3, and 5 each have two tasks that depend on it; this and a few other things has me writing my own vim plugin for vimwiki that'll handle handle the above, plus a few other differences).

[0] [https://github.com/tbabej/taskwiki](https://github.com/tbabej/taskwiki)

<comment><USER13> Awesome write-up of your flow. Thank you.

</comment></comment><comment><USER14> I wrote a post on this some time back:

[https://zwischenzugs.com/2017/12/03/how-i-manage-my- time/](https://zwischenzugs.com/2017/12/03/how-i-manage-my-time/)

if there's one takeaway, it's that you have to find your own way of getting what's in your head into a place you can trust, and there's no objectively right place for that. Just keep looking until you're comfortable with one and stick to it.

<comment><USER15> > you have to find your own way of getting what's in your head into a place > you can trust

That's definitely #1. I'm surprised I had to scroll so far down to find it. :)

For a long time I was looking for a system that would auto-prioritize tasks for me. I'd dump things in, and it would tell me what I had to do today, this week and this month. Long story short, it turned out to be a silly expectation.

So #2 rule should be, review your tasks periodically.

Basically, an 80/20 productivity system should be:

#1 write everything down #2 review and cull your list every day #3 do things off your list

<comment><USER14> > #1 write everything down #2 review and cull your list every day #3 do things > off your list

That's pretty much the 'Getting Things Done' book in a sentence! Though the advice is every week, not day in the book, and latterly changed to 'whenever works' with the advent of web systems to track tasks.

</comment></comment></comment><comment><USER16> Taskwarrior is very nice, but I found org-mode combined with the mobile client orgzly even nicer. Export to ical, sync to server and you have it in your watch or mobile calendar as well.

<comment><USER17> Do you struggle with orgzly's sync management though? Things seem to get out of sync a lot with syncthing, so I've stopped editing lists on my phone (which... is starting to defeat the current iteration of the setup). Or do you use dropbox?

With WebDAV on MobileOrg, I never really had these problems.

<comment><USER18> I use Dropbox, and it generally works a-ok with Orgzly. That said, I rarely find myself using Orgzly - but it's invaluable when I'm on the go and need to check some info stored in my org files.

It used to have issues, but after couple iterations it seems to be working quite well now. Some time ago scheduled tasks even started to generate notifications on the phone, so now I find myself syncing more often just so that I can get those reminders when I expect to spend a lot of time away from my computer.

The only thing problem I had with it is that if I delete a file locally, and then sync Orgzly, it'll restore the file on Dropbox instead of picking up the delete. After having to re-delete some files couple of times I now remember to watch out for it, so it's not really a problem anymore.

</comment></comment></comment><comment><USER19> Task warrior is a hell of a tool - it's synced accross my devices and doesn't need proprietary software. I built a Taskwarrior app for pebble as well, so I can have the tasks that have a deadline in the timeline.

<comment><USER5> Please share the Pebble stuff!

<comment><USER19> [https://github.com/konradit/pebble- taskwarrior](https://github.com/konradit/pebble-taskwarrior)

</comment></comment></comment><comment><USER20> Years ago I used Remember the Milk and then hopped between multiple "other" solutions over the years. Decided to give RTM another look last month and was really impressed.

In hindsight I should have never left it.

IMO Dropbox needs to purchase them to integrate with their growing offering.

</comment><comment><USER21> I've used taskwarrior for 3-4 years exclusively, and can state that if you have a complaint about it, it's highly likely that you haven't considered the problem scope as deeply as its devs did.

But then I stopped being a lone wolf dev and it simply doesn't work for teams. Yet.

<comment><USER5> Even if you work in a team, surely you take on individual tasks based on what team has decided?

</comment></comment><comment><USER22> Is there anyone who used org mode and taskwarrior to get a compare and contrast?

<comment><USER23> I guess Org mode is better for someone who is already an Emacs user; and does anyone use Org mode without Emacs?

Taskwarrior is probably a fine piece of software though.

<comment><USER24> > does anyone use Org mode without Emacs?

Well, I use Orgzly on my phone, but I use emacs on my desktop & laptops. Orgzly is okay, but not great — and it has some weird bugs. It's definitely not a complete port of Org mode, or even a port of _most_ of Org mode. For what it is, though, it's better than nothing — and better than the current alternatives.

I really wish that there were a good touch-aware port of emacs on Android.

<comment> yjftsjthsd-h It isn't ... really... touch-aware, but shout out to termux for running normal/full emacs on Android if you're into that. (It will input touches, I think as mouse events, it's just not what you probably meant by touch-aware)

</comment></comment></comment></comment><comment><USER25> I wonder why no one has mentioned using Google-Calendar as a task-management tool. I too use (starred) emails to remind myself of tasks that I have pending. But for anything that's time specific, I just put it on my google- calendar (or any online calendar really).

Eg: Mow my lawn on Sunday? Ok, I'll create an all-day event on Sunday to mow- my-lawn. And once I'm done, all I have to do is delete it. I can then periodically check my calendar from my phone/laptop/tablet, and see everything I have to do that day/week. If I want to get a head-start on anything that's coming up next week, it's all there on my calendar too. If I need a reminder, I can just have it send me a push-notification at a specific time. Best of all, I never have to be at my computer to get all these info/alerts. As long as I have my phone nearby, I can check my tasks, and get reminders for anything I've forgotten about.

<comment><USER26> Yeah; basically any calendar app. Every OS/device comes with one built in; they can sync across all your devices; they expose the database via SDK or API so you or others can augment them with additional tools (though I don't find it necessary).

For me, this has been a solved problem for many years.

It's one of those things where everybody's different, I get that.

But using an email system to manage your tasks seems only one step less goofy than calling yourself and leaving yourself voice mails. You can make that work, I guess, but that's not what the tool is for.

I think modern calendars are one of the great software success stories, actually. They are rock solid reliable, based mainly on hackable open standards, and work everywhere. I don't delete things from my calendar, I just leave them in there as a fossil record of my life.

(What was I doing ten years ago on this day? I just checked; apparently I helped my girlfriend sell her car, bought my sister a plane ticket, and worked on software for most of the day.)

This data has moved with me from platform to platform and will be accessible my whole life. This is how computers are supposed to work! (But seldom do...)

</comment></comment><comment><USER27> Shameless plug for [https://heyhabit.com](https://heyhabit.com) (I'm the dev). It's meant to be used as a chrome extension that takes over the new tab in Chrome, but you can try it from the website. I've been using it for ~2 years now and it works really well off and on. I've discovered that it's really helpful for getting me back on track when I fall off the horse. Because the calendar maintains what a "successful" week looks like for me, it eliminates some of the mental energy required to regroup.

</comment><comment><USER28> offtopic, but I really like the fresh minimalism of the website. The colors and the choice of the monospaced font are quite unique. It captures the feel of using a terminal without being boring.

<comment><USER29> Don't know about you but on iPhone Safari it's terrible. No momentum scrolling makes it exhausting to scroll through, and there's a broken horizontal scroll.

<comment><USER30> Yes. It's horrible. I opened it for like 2s and gave up. I guess if reader mode works this could be OK.

Don't override scroll behavior.

<comment><USER31> It's even worse than that. I actually scrolled all the way down on an iPhone and the last third of the article was cut off and only accessible through reader mode.

The irony of a paean to command line tools being housed in unnecessarily compromised UX is a bit much.

</comment></comment></comment></comment><comment><USER32> The todo.txt file format supports extensions, and some of the extensions include start date, due date, recurring tasks. The Simpletask todo.txt Android client supports these, and can filter by things that are past their start date, sort by due date, etc. Todo.txt also supports projects/contexts/lists/tags and Simpletask can filter by them.

i don't know which todo.txt commandline clients, if any, can do this but i bet some can (topydo maybe?). Simpletask supports Lua scripting, i dunno if this is sufficent to allow dynamic prioritization of tasks, but it might be. I don't think Simpletask supports dependencies but topydo does.

todo.txt is a file format. The nice thing about todo.txt-based tools is that the todo list is stored in a plaintext file in a relatively readable and editable format, with one line per task. This allows you to edit it using ordinary text editors, grep it, and sync it using utilities (resolving conflicts on a line-by-line basis).

<comment><USER33> One big area where taskwarrior shines compared to solutions like todo.txt or org mode is synchronizing between devices using taskd. Although it is a bit involved to set-up, once it works, it works very well.

I am slowly trying to add task identities to Simpletask to get closer to this ideal (at the cost of 'ugly' meta data in the Todo file)

</comment></comment><comment><USER34> I use Google Keep with pretty good success. Having one list for "To-Do Now" (daily stuff) and one for "To-Do Later" (longer term goals). The key for me is syncing across devices. If I can't add the to-do quickly when I think of it then the system wouldn't work for me.

<comment><USER35> What makes Google Keep useless to me is that there is no 'sort by most recently edited' option, same as Google Drive and really everything google makes. I have to manually bring each note to the top every time I edit it, which kills the functionality.

<comment><USER34> I tag my to-do lists as "TODO" and pin them at the top. On Android I have a widget setup only to show things with the "TODO" tag.

</comment></comment></comment><comment><USER36> I run into this every once in a while, but the sticking point is always the mobile picture. If I want to add a todo item using my phone, what are my options?

Anyone have any experience with this?

<comment><USER37> I use Google Tasks for this and I love it. It's super simple and lightweight and I really hope they don't kill it.

<comment><USER38> I wish they would add more features. I would love a full featured free TODO app from Google.

<comment><USER5> What features do you need?

<comment><USER39> Not the parent commenter, but...

\- Add a time to reminders, as they're currently only due date reminders. (Nearly useless, really, other than appearing on your calendar.)

\- Merge Tasks remidners with the Google Assistant reminders, and the Google Keep reminders. Three different places to have Googley reminders, all separate.

\- Re-arranging the task lists. (You can only re-arrange tasks on a list, but not the lists themselves. This is a basic feature that is surprisingly missing.)

\- Add a widget for the Android home screen so you can keep a specific list in full view all the time. (This is kinda' a personal wishlist item.)

\- Add Google Assistant voice command support to create tasks, review tasks, etc. (Super useful while driving and remembering something.)

\- Add tagging to list items, and a search function so you can have "meta- lists" like "All Items Due Today" without having to maintain items across lists. (This would allow you implement the GTD methodology.)

\- Add minimal per-list collaboration of some sort, similar to Keep. (I guess it's already available for Keep, so maybe not super relevant.)

</comment></comment></comment></comment></comment><comment><USER40> [http://mgsd.tiddlyspot.com/demo3.html](http://mgsd.tiddlyspot.com/demo3.html) TiddlyWiki powered GTD system

<comment><USER41> mGSD is based on TiddlyWiki Classic, here is GSD5, a new project, built on the current version, TiddlyWiki 5:

[http://gsd5.tiddlyspot.com/](http://gsd5.tiddlyspot.com/)

<comment><USER40> I find tw5 a step backwards in terms of usability. Not a fan of design aesthetics which decrease information density.

</comment></comment></comment><comment><USER42> Like the author I went through too many solutions to organize myself. (Evernote, iOS Reminders app, OneNote, emacs/org-mode, Google apps, iOS Calendar, Omni tools & many more). I've settled down on using Apple Notes & Things 3. Things 3 is expensive, but it's simple & has a beautiful UI. It structures tasks in the same way I think about them. I really like the Quick Entry feature on the Mac, where I can quickly add a to-do from a web page or an email... The app seems to be well maintained and I am glad they didn't choose the subscription route. My biggest wish, a web API.

I really like Notion ([https://www.notion.so/](https://www.notion.so/)), and I am sure I could do a great GTD system in it! However, I don't feel comfortable with subscriptions on apps where I keep MY data. Maybe because I grew up relatively poor, I always have the fear at the back of my mind, that maybe in the future I won't be able to afford it and what a big hassle that would be.

</comment><comment><USER43> I got really excited about Taskwarrior and set up a server and accounts for all of my teammates. But we quickly found that we were spending more time logging our tasks than we were actually consulting TW for what to do next.

Example:

task add project: support_customer_migration priority: H -- support#XYZ - analyze dependencies for customer X - github.com/repo/issue/number

<comment><USER5> I think a common misconception of planning is that you wish to avoid logging and the "hassle" it means. For me, logging what I have done is the only way to keep track of the project status and let my team members know what have been done.

</comment></comment><comment><USER44> I tried this as well.

I'm yearning for a tool that lets me drag & drop an email, and it automatically creates a task based on the content. I can obviously go and edit it after setting deadline or assign to project etc.

I was hoping to create this workflow with MS Outlook(on Mac) and its inbuilt Tasks, but apparently they don't support it :-(

I would pay for such a feature.

<comment><USER45> Things ([https://culturedcode.com/things/](https://culturedcode.com/things/)) does pretty much that. It has a little Quick Entry daemon which lets you press control-option-space in Mail.app to make a new task linked to the selected mail. By default, the subject ends up as the task's title, though you can change it before hitting Return.

In general, I highlight recommend Things. It does all the typical GTD stuff, in a mostly Maclike way, and has a great iOS client.

[Edit: In fact, you can actually drag a mail right into a Things window as well, just as you propose. I never knew that!]

<comment><USER46> Can you click on a created task in Things and get back to the mail message in the iOS Mail app (as opposed to just seeing a copy of the message as text in the todo app the way most todo apps handle email->task connections)?

<comment><USER45> Absolutely. The links even resolve on different devices, as long as you have access to the same mail accounts.

<comment><USER46> Looks like I just blew $10 on this.

The iPad version allows you to create tasks truly linked to emails but the iPhone version doesnt let you create them you can only open them (from what I can find, hopefully I'm wrong as I've been looking for this feature for YEARS and would love to make this app home)

</comment></comment></comment></comment></comment><comment><USER47> Since nobody has mentioned it, ToodleDo is a good tool with a slightly dated UI and a terrible name. It has mobile apps, 2FA, projects / subtasks / scheduling / optional alarms, and a variety of other related features. There's a free restricted version, also a paid version, which is reassuring.

<comment><USER48> I'm a long time user and have paid the ~$20/year, subscription for >5yrs. It's been rock solid the whole time.

I find it's got the right out of GTD without being too bloated and/or cumbersome to use.

</comment></comment><comment><USER49> Does anyone use Taskwarrior with more than just a few tasks? I have about 15 projects going at once and flip between them numerous times during the day. The projects might have several sub-projects and multiple next actions.

Are Projects/Subtasks implemented well?

<comment><USER50> I use to break all of my work up into smallest tasks possible. Was doing pomodoro, with two large projects, hardware and software, development and management, multiple feature and bug releases. So tons and tons of tasks! At one point I had it automated so when I was doing a bug fix I'd create a set of dependency connected tasks (Understand Bug, Create Fix, Create Unit Test, Code Review, Documentation, Push Update). I could easily have a hundred tasks in the queue at any given time.

<comment><USER5> Wow, that was a great tip. I'm also finding myself splitting tasks into recurring steps like you mentioned, so automating this will save me lots of time.

</comment></comment></comment><comment><USER51> This 30 minute video from the recent Linux.conf.au may also be of interest.

[https://youtu.be/zl68asL9jZA](https://youtu.be/zl68asL9jZA)

Manage all your tasks with TaskWarrior

</comment><comment><USER52> Wish I'd seen this a few weeks back before building my own command line app, it seems I've taken an almost identical approach to them in everything I've implemented, though obviously they're much farther along! Still, part of the motivation for building my own was to trick myself into getting the habit of checking the list every day since I'd be keen to dogfood it - that's worked out pretty well so I can't complain!

<comment><USER53> Me too, I just wrote a quick CLI app for logging my work on Monday

</comment></comment><comment><USER54> If you just want to schedule emails without involving too many third parties, you can do this in the Outlook mobile app by swiping right on any email. For the desktop app, right-click an email and use the "Follow Up" menu.

You can also do it in Google's Inbox app, but you have to swipe left instead. The Inbox website lets you schedule emails by hovering over an email and clicking the clock icon.

</comment><comment><USER55> Not sure if this helps, but I made a little iOS app a while ago to help with my workflow. Check it out: HiFutureSelf ([http://hifutureself.com](http://hifutureself.com))

HiFutureSelf is a super fast way to send messages to the future as reminders. You can set a time or location to trigger the message. It's completely free and maintained for fun :)

<comment><USER56> I use calendar events. Then I can also allocate time to do the task.

<comment><USER55> Totally! I do too!

Maybe it's just me.. but somethings just don't fit into the calendar.

Like when I pull up to the gym I get a message to do my 100 squats for the day (AND NOT ACCEPT LESS). Or when I arrive to the grocery store to pickup shampoo. Or when I leave the office today to go by the pharmacy to pick up a prescription...

</comment></comment></comment><comment><USER57> I'm currently using Asana for task management. I guess the only upside is that I can share tasks with my wife, but its clearly not really meant for just single person management.

Has anyone tried both taskwarrior and asana? Any obvious pros/cons?

taskwarrior seems much simpler and can live locally if you dont want locked in asana/whatever?

<comment><USER58> I've tried both. I liked Asana a lot in the early days - it was simple and removed the friction of logging tasks. I especially liked that many tasks could be entered in the same way as an outline, just using enter to drop to the next line and tab/shift-tab to nest tasks. All the task properties I needed were visible at once and I could quickly tab through the task details and log what I needed. Eventually they added more features for teams and the features I liked became more complicated to use, so I dropped it.

I tried taskwarrior as well, thinking that being in the command line would reduce the friction for entering tasks as I spend so much time there already. However, the friction is higher for viewing and reorganizing tasks so I would fill up a todo list and then not use it.

</comment></comment><comment><USER59> This seems really cool but I can't imagine using a task manager that doesn't also have a mobile app.

<comment><USER11> Taskwarrior has a mobile client: [https://taskwarrior.org/news/news.20160225.html](https://taskwarrior.org/news/news.20160225.html)

<comment><USER60> The play store link seems dead, though?

<comment><USER11> Hm. The taskwarrior app I use daily is gone from the Play Store.

The author now offers something called TaskwarriorC2 that may have similar functionality, with a different UI spirit.

 _Edit:_ I just installed TaskwarriorC2 and got it working (by hand-copying my hard-won profile configuration from original taskwarrior (pem files, taskrc, etc., the whole profile directory)) from kjv.task/files/ over to the com.taskwc2/files/ directory on the phone. Editing the taskrc file is currently broken for me, so if I hadn't already had one, configuration would have been daunting.

Now that TaskwarriorC2 is working: If you're a taskwarrior poweruser, the interface is awesome. If you'd never used taskwarrior before, it would seem inscrutable.

<comment><USER61> I was never happy with the Taskwarrior client you linked so I'm launching a mobile client alternative for taskwarrior: [https://wingtask.com](https://wingtask.com)

<comment><USER11> Awesome. <Picard>Make it so!</Picard>

</comment></comment></comment></comment></comment></comment><comment><USER62> I find invariably that if I write something down anywhere, it falls out of my head, after which point I stop thinking about it, I lose motivation, and unless I permanently slave myself to the task manager it does not get done. There is a lot of value in keeping everything in your head.

</comment><comment><USER50> I use to use Taskwarrior, using all its features until one day my work life lost all complexity. At that point I felt like all the key features of Taskwarrior were lost because I just didn't have enough complication to track.

Now I just use todo.txt and that seems to cover everything I need.

<comment><USER63> Do you mean the "todo.txt" CLI ([https://github.com/todotxt/todo.txt- cli](https://github.com/todotxt/todo.txt-cli)), or just a file you edit manually?

I've used the todo.txt CLI on and off, sometimes in collaboration with my (shameless plug) "friends" CLI ([https://github.com/JacobEvelyn/friends](https://github.com/JacobEvelyn/friends)) for "tasks" that are social in nature. But I always seem to come back to paper todo lists.

<comment><USER50> I actually wrote my own in Haskell, but really I just mean the structure. I no longer need huge ordered lists of blocking dependencies. I loved that taskwarrior did that, but once your life becomes less complicated, all the cool features seemed to get in my way. I wanted burndown charts. I wanted an app to figure out what tasks were highest priority based on how much time they could take and deadlines. But once you no longer have any of that...it is basically todo.txt

Edit:

I should also add that with my daily life (outside of work) I'm strictly a pencil and paper kinda guy. I hate when my phone dies and I have no idea what I'm supposed to do today.

Might as well return the shameless plug with my own ([https://github.com/jecxjo/todo.hs](https://github.com/jecxjo/todo.hs))

<comment><USER64> There are some extensions that bring task dependencies to todo.txt. IMHO outlines are a quite natural extension of the original format that can be used for that without making things too complicated.

<comment><USER50> I totally agree. I am currently trying to figure out how to best do that with todo.txt with the minimal amount of dependencies. I liked in taskwarrior how all the tasks were numbered and could be referenced, but it required a big infrastructure in taskwarrior, which is more painful in todo.txt.

<comment><USER64> There is no use in numbering tasks in todo.txt files. But you (as a developer) can create an id based on the current time stamp and the tasks content that can be referenced later on. The VIM ttodo_vim plugin does it this way.

</comment></comment></comment></comment></comment></comment><comment><USER65> It always blows my mind when people who claim to have issues with focus or task management then go on to talk about how they've automated tons of trivial tasks. That sounds like the OPPOSITE of someone who has issues with focus.

<comment><USER66> There are people who are so task focused that they waste a lot of energy worrying that they're not working on the right task! If you're at all like me, then this is a foreign concept. The introduction to GTD hints that it is specifically targeted at people like this to reduce their anxieties. It also caused me to stop reading the book because, as I said, that concept is mostly foreign to me (I have observed it in others, but my empathy is insufficient to truly understand it).

<comment><USER50> There are also people w/o the anxieties, who live their lives as firefighters. Every day take on the emergencies!

That was me for a long time. When you have a job that is constantly filled with fires you can survive for a long time doing this. The problem is that sometimes a non-fire tasj can start out as low priority but eventually become the most important thing you have to do today all based on a due date. Unless you are good at managing your future tasks, you'll often miss them.

I never had anxieties about getting things out the door, mostly because my bosses were constantly chopping down one or two of the legs of my stool (money, time, resources). But it was easy for me to keep pushing a low priority task to the bottom of the list because its not due yet, totally forgetting about the fact that eventually it will be due.

</comment></comment></comment><comment><USER67> Hitask ([https://hitask.com](https://hitask.com)) does everything, has Google Calendar sync and Chrome extension. iOS, Android apps, team sharing and many more.

</comment><comment> joe-collins I know Google's scary, but having task management/scheduling built into and up-front in their Inbox is wonderful. When I saw that, I ditched the old gmail interface and haven't looked back.

</comment><comment><USER68> Am I the only one still using a #2 pencil and a piece of paper for my 'to do' lists???

<comment><USER69> I carry a Mead memo book and a pen in my back pocket at all time, it's great for taking notes, recording stuff I don't want to forget, doodling, etc..

Added bonus: I can take it out to write a to-do and not accidently spend 20 minutes on Twitter or HN. Beats any other productivity app I ever tried in that regard.

<comment><USER66> After having a mead go through the laundry, I switched to a rite-in-the-rain with a fisher. The notebook can survive 2-3 trips through the laundry before it becomes hard to read.

</comment></comment></comment><comment><USER70> Why is a todo list a good idea?

<comment><USER71> I understand why the TODO list is a good idea. My memory is terrible, I get confused if I don't write down everything I was doing and everything I was planning to do the next day.

What I'm unsure about is whether the actual tech behind the TODO list matters. It seems we love to discuss this (or reimplement it!) because we're programmers and/or tech people, and tech naturally appeals to us. But I'm unsure Taskwarrior or any particular tool actually matters. I think what matters is that you keep a TODO list in whatever format is useful to you. To me, the discipline matters; the actual tech/UI behind it is pretty much irrelevant.

<comment><USER72> > I think what matters is that you keep a TODO list in whatever format is > useful to you.

It's just that. That's why programmers keep making todo lists. Because some people want more flexibility, some want less. Some need some specific feature set, and some think other features are stupid. They're simple enough systems that people can build whatever flavor they want -- and it'll work for them -- rather than be constrained to whatever is available.

</comment></comment></comment><comment><USER73> Awesome. Could someone recommend note-taking tool with the same spirit?

<comment><USER5> vim.

</comment></comment><comment><USER74> The way this article scrolljacks on mobile makes it unreadable.

</comment><comment><USER75> I didn't knew FollowUpThen, it seems very handy.

</comment><comment><USER76> Why doesn't this site do inertial scrolling properly on my iPhone?

<comment><USER75> Author has too much time in his hand now, and decided to reimplement scrolling.

<comment><USER39> I don't see any actual¹ JavaScript on the page, so how would this have been accomplished? Some fancy but broken scrolling manipulation CSS...?

1: The only JS on the page is an IE conditional comment adding an HTML5 shim script, and the Disqus comment embedding script. Then there's the Google analytics that gets pulled in from font references and I guess Facebook JS via the Disqus embed.

<comment><USER77> It's some not-even-fancy CSS. The site has "overflow: auto;" on the body :/ RIP iOS users

[https://css-tricks.com/snippets/css/momentum-scrolling-on-io...](https://css- tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements/)

<comment><USER66> WTF! I had no clue that overflow: auto messes things up so badly for iOS users. I'll have to file that for the next time I'm writing CSS. I wonder what the justification for that is...

</comment></comment></comment></comment></comment><comment><USER78> Was immediately turned off by his devotion to the ridiculously overrated Inbox Zero.

Inbox Zero is a gross waste of time and essentially OCD masturbation. Using tools (like filters, or a better email client with smart prioritization such as [https://sparkmailapp.com/](https://sparkmailapp.com/)) to prioritize important emails is far superior and has zero ongoing maintenance cost in time:

[https://www.inc.com/geoffrey-james/worlds-dumbest-time- manag...](https://www.inc.com/geoffrey-james/worlds-dumbest-time-management- technique-inbox-zero.html)

If you want to _actually_ get productive, get RescueTime: [https://www.rescuetime.com/](https://www.rescuetime.com/)

There is a very good reason why the Spark iOS app doesn't even bother showing your unread count.

<comment><USER79> I am more productive with zero inbox than other tools. And since neither of us can prove we are right, let's accept it's just an opinionated tool, and it's a matter of taste.

<comment><USER78> > And since neither of us can prove we are right

Actually, that's false. Use [https://www.rescuetime.com/](https://www.rescuetime.com/) and compare with people who don't use this system, divide by the number of incoming emails per person, and you'll know in short order.

Empirical data is a wonderful tool to find truth.</comment></comment></comment>


Generating unique IDs: an easy and reliable way - <AUTHOR> http://antirez.com/news/99 <comment><USER2> Using SHA-1 in this way, with a random seed and a counter, is just building a (perfectly sound) CSPRNG with, I believe, an 80-bit security level. If you trust the source of the random seed, e.g. /dev/urandom, you may as well just use /dev/urandom itself. If you don't, you're already in trouble.

I'd like to see actual benchmarks of /dev/urandom vs. a userspace PRNG before believing the argument that it's too slow. Some people (I seem to recall Chromium does this) have done the benchmarks, _and_ use enough random data that they implement their own userspace PRNG. Most applications don't need it.

It's also possible that getentropy() on OpenBSD and GNU/Linux recovers enough of the performance. The system call path is extremely fast, and the kernel isn't doing random number generation any faster than you are -- unless you're doing a bad job of it.

And if you somehow need a userspace PRNG, the usual advice about not rolling your own crypto unless you know what you're doing applies. (Especially for database IDs, the risk of collisions should be considered a security problem, ergo this should be considered crypto, until proven otherwise.) In this case, using BLAKE2 instead of SHA-1 would get you a higher security level _and_ faster hashing.

Or, in tptacek's words: [http://sockpuppet.org/blog/2014/02/25/safely- generate-random...](http://sockpuppet.org/blog/2014/02/25/safely-generate- random-numbers/)

<comment><USER3> On Windows at least I had no trouble getting many hundreds of MBs/sec out of the default CSPRNG (which uses AES CTR or something like that) - even with small calls. (A customer was insisting that generating 16-byte IDs this way was too slow for production apps and was shown to be incorrect.) It'd be surprising if other OSes weren't around the same level.

<comment><USER2> On Linux it's easy to benchmark this via e.g. `dd if=/dev/urandom of=/dev/null bs=1M`. On my somewhat old server (with Intel Core i5s from 2012), I'm getting 17 MB/s.

Supposing we blame slowness on syscall overhead: at a block size of 16 bytes instead of one megabyte, it slows down to all of 11.6 MB/s, that is, some 700,000 128-bit IDs per second. (And since we're not using SHA-1, all 128 bits are meaningful for collision resistance.) For comparison, Twitter gets about 1% that many tweets per second, globally.

If anyone has plans of scaling to 100 times the size of Twitter on a single 2012-era Core i5, and has figured everything else out already, I'll be happy to audit your userspace PRNG then.

<comment><USER4> What about the case of using Linux in a VM? Isn't there a possible problem with the amount of entropy available?

<comment><USER3> You only need 16-32 bytes to fully seed a CSPRNG real good. It's true that some VM setups have had issues, yes, but that shouldn't generally be the case. But a user mode generator isn't gonna do any better.

</comment></comment></comment></comment></comment><comment><USER5> If you don't need consecutive IDs, use a UUID or a Random UUID if you can get away with it.

If you do need consecutive IDs, use atomic operations on a counter (compare- and-swap type increments, AtomicInt in Java, etc). Need to preserve them after a restart? Reserve a block of size N, when you get close to N, stop generating until you've persisted the reservation for the next N identifiers. Atomic increments will ensure you never hand out the same number twice, and reserving a block before you persist will ensure that you'll be save even after a power outage or whatever.

Why bother with incredibly long random numbers? It can go wrong in so many ways. The probability of duplicates being low _does not mean_ that you won't get duplicates.

<comment><USER6> _The probability of duplicates being low does not mean that you won 't get duplicates._

This is true for cryptographic hash functions, yet in practice no one has a problem with using them for identifying files etc., because their output space is so large as to make the chance of a collision sufficiently low. I'm almost willing to bet that even for ones which are cryptographically insecure like MD5, and for which colliding pairs can be easily deliberately created, there hasn't been a truly accidental collision.

(Fun experiment to try: hash all the files you own, and then compare byte-by- byte the ones with the same hash. Try a few different cryptographic hash functions. If you do find accidental collisions, you've just experienced an event far more improbable than winning the lottery; and if it's SHA1, SHA256, or bigger, it's worth publicising this event.)

<comment><USER7> I have seen an md5 collision happen at work. Having low probability doesn't mean it won't happen, you just don't know when - people win the lottery around the world daily.

<comment><USER8> Did you see a MD5 collision that happened randomly, or was someone intentionally trying to create one?

 _Intentionally_ creating a collision with MD5 is fairly easy; having one happen at random would require creating something like 10 ^ 14 _billion_ hashes in order to have the same chance of a collision as winning the lottery. People win the lottery, yes, but they don't happen across MD5 collisions by accident.

<comment><USER7> Random! I don't remember the details, but we spent a good half hour looking up probabilities and marvelling at it. I think at the time nobody realized just _how_ unlikely it was, should have saved the inputs :(

</comment></comment></comment></comment></comment><comment><USER9> This is an interesting topic -- and I'm super-excited that Salvatore is working on Disque!

Below are a few methods I've seen for UIDs.

Setup used by MongoDB[1]:

        [ time, machine_id, process_id, counter ]

Twitter Snowflake[2] use something similar to the above.

Cassandra[3] use something like this:

        [ time, version, variant, counter, node_id ]

Flickr on their ticket-DB[4] and Instagram on their setup[5].

\---

[1] [https://github.com/mongodb/bson- ruby/blob/master/lib/bson/ob...](https://github.com/mongodb/bson- ruby/blob/master/lib/bson/object_id.rb#L372)

[2] [https://blog.twitter.com/2010/announcing- snowflake](https://blog.twitter.com/2010/announcing-snowflake)

[3] [http://wiki.apache.org/cassandra/TimeBaseUUIDNotes](http://wiki.apache.org/cassandra/TimeBaseUUIDNotes)

[4] [http://code.flickr.net/2010/02/08/ticket-servers- distributed...](http://code.flickr.net/2010/02/08/ticket-servers-distributed- unique-primary-keys-on-the-cheap/)

[5] [http://instagram- engineering.tumblr.com/post/10853187575/sha...](http://instagram- engineering.tumblr.com/post/10853187575/sharding-ids-at-instagram)

</comment><comment><USER10> The author says SHA1_HMAC would make IDs "very hard" to predict compared to SHA1, but this is not true at all. An attacker _can_ bruteforce the seed either way. In practice the double hash construction used internally by HMAC will make bruteforcing ~twice slower, but that is a minor difference. If you want to double the difficulty of bruteforcing the seed, a better way is to just add 1 bit to it.

The easiest and most secure way to generate unique IDs is to just read 256 bits from getrandom() or /dev/urandom. It is so simple that most programmer won't botch up an attempt to implement that. 256-bit IDs give you a 128-bit security level, which is a good default to aim at.

<comment><AUTHOR> 1\. It's assumed that the seed you get from /dev/urandom is unguessable. This is a very solid assumption to make. The reason why it's a good idea to use an HMAC is entirely different and is the following classes of attacks, not a matter of costs of bruteforcing (which is impossible becase of the search space, without having some clue of the content or state of /dev/urandom). For example, for an error the code could be written to SHA1(seed || counter). In this case you can "re-open" the hash function and perform an "length extension attack", so you add "0" at the end and successfully predicted one of the successive IDs. HMACs are constructs used to make sure the secret and plaintex is mixed in a more cryptographic robust way, basically.

2) If you don't trust /dev/urandom to seed the generator, you have no reasons to trust that /dev/urandom cannot be predicted by observing some part of the old stream of bytes.

More information about the attack I described are available here: [https://en.wikipedia.org/wiki/Length_extension_attack](https://en.wikipedia.org/wiki/Length_extension_attack)

<comment><USER10> The construct described in your blog, H(counter+seed), is _not_ vulnerable to length extension attacks, so you gain nothing by using an HMAC here.

The only thing I thought you could be theoretically referring to when you wrote "very hard to predict" was bruteforcing, so I talked about bruteforcing on a theoretical level. I agree of course that a 160-bit seed from urandom can be trusted and is not bruteforceable in practice.

<comment><AUTHOR> To make things simpler for our discussion, I made as example the length extension attack, but message||secret has other more subtle issues (there is extensive documentation about it and many papers detailing the attacks. A more robust way that is still weak compared to HMACs is secret||message||secret). So you gain security by using an HMAC. Given all the above you may want to update the sentence "The author says SHA1_HMAC would make IDs "very hard" to predict compared to SHA1, but this is not true at all", for the sake of other readers not following the whole discussion.

<comment><USER10> Again, your H(counter+seed) solution for generating unique IDs is perfectly fine. This is clean, neat and fast. There are no subtle issues whatsoever. An HMAC will not give you any extra security in this case. (The issues with H(message+secret) only exist when the attacker has some control on "message", but he does not in your case --I am familiar with this, I do crypto reviews for a living.)

I cannot update my comment (HN only lets you edit posts < 2 hours old), but I would not want to update it anyway since what I say is true :) However I think you should edit your blog post and mention that the order of concatenation of the counter and seed is important. If you want say something along the lines of "HMAC is traditionally the best practice but in this case H(counter+seed) is fine".

</comment></comment></comment></comment></comment><comment><USER11> You could always just use UUIDs [1], or generate your own isolation and uniqueness.

Personally, instead of randomness, it's easier to just make your keys multi- part to give each process an independent portion of the address space.

{ip/mac, pid, thread_id, start_timestamp, counter}

128 + 32 + 32 + 32 + 32.

increment the per-thread counter, because it's per-thread, no atomic operations required.

Weaknesses : pid re-use inside of the resolution of start_timestamp.

[1] [https://tools.ietf.org/html/rfc4122](https://tools.ietf.org/html/rfc4122)

<comment><AUTHOR> This method leaks internal info (ip/mac), and is not as collision resistant as the one I propose. imagine you have an embedded system that after a restart has the internal clock reset because of clock battery failure. Pid and thread_id are the same after every restart (or may be the same) because of the OS initialization steps which are simple and deterministic. You have your system in "reboot loop" for some reason. It reboots every few minutes. Soon or later you'll generate a repeated ID. Given the method is also more complex, why to use it?

</comment></comment><comment><USER12> I've always been particular to pre-pending the current time (epoch, date, whatever) to the start of a UUID of some sort.

Mathematically, you're actually more likely to generate collisions this way, but we're talking 0.00001% in a million years vs 0.001% in a million years. It won't happen either way, practically speaking.

And the benefit? It's usually easier to explain to other people. It's more intuitively safe because there would need to be two colliding keys generated _the same second_.

<comment><USER13> However many bits you're using to store the timestamp would better guarantee uniqueness if they were random. Whether it's intuitively safer or not, it's empirically less safe.

This is exactly why the UUID spec evolved into a pure random value.

<comment><USER14> Agreed, but it can still be a useful technique if you ever need to sort your values by time, in which case it's logically a tuple masquerading as a physical single id.

</comment></comment></comment><comment><USER15> Is this any better than reading 160 random bits from /dev/random and iterating? If unpredictability is a requirement it is - but it shouldn't do any better vs collisions?

It might even be a little worse than counting atraight up?

<comment><AUTHOR> The problem is that /dev/random, and /dev/urandom in certain systems (it may be just a symbolic link to /dev/random in the extreme case), depletes soon and blocks until the OS can collect new entropy. Even when /dev/urandom can be used without ever blocking, like in Linux, it is slower than just computing SHA1(secret||counter).

For the goal of just getting the initial seed /dev/random is just good. So basically the method described works almost everywhere there is _some_ even slow source of unguessable bits.

<comment><USER15> I meant reading 160 bits, then counting up:

      start = 160bits from /dev/random
      next_id = start+1

Using a hash function would _seem_ to be more random, but you're effectively walking a path that is no more random than enumerating all 160 bits numbers. I don't thing there's any guarantee that "walking" from 1 with sha1(1+inc), is any less likely to converge on sha1(bigint+inc), than "walking" from 1 and bigint by simply increasing by 1.

On the other hand, if you had some sort of communication between nodes, it'd be trivial to predict if two instances would overlap, if you just kept incrementing "big random number 1" and "big random number 2".

ed: If sha1 is a perfect hash function (I don't know if has been proven to be that?), then sha1sum(seed+inc) shouldn't be _more_ likely to collide than seed+inc % 2^160. But if you have one such "random" identifier, you can of course much more easily guess previous/next identifiers, than if using a secure hash function.

ed2: I suppose it should be obvious that given a pair of seed1+inc1=seed2+inc2, both plain iteration and sha1sum(seed+inc) will collide. I'm not sure if there are cases where (seed1+inc1, seed2+inc2)<2^160 [ed3: and seed1+inc1 != seed2+inc2 ] can collide after running them through sha1.

</comment></comment></comment><comment><USER16> This is building another CSPRNG from an already existing one. I'd suggest you leave the CSPRNG part to the OS.

</comment><comment><USER17> Why not just use version 4 UUIDs? In Python, at least, they are generated directly from /dev/urandom.

<comment><AUTHOR> Using /dev/urandom to generate every new ID is not optimal for a few reasons:

1) It's not better than the method I suggested, but requires to use I/O for every generated ID. So without gaining anything you lose performances. In fact you could imagine /dev/urandom as a more complex form of an hash function in "counter mode". Given that for this application, cryptographic properties are not needed, but only good distribution, the two methods are identical but one is very fast and one is slower.

2) /dev/urandom in certain systems, notably OSX, at some point may block for some time, it is not guaranteed to be always able to generate a stream of random numbers. Certain operating systems may generate only a given amount of stream to /dev/urandom, starting with a given amount of entropy they have in the pool. If the seed cannot be renewed with new entropy the OS may block readers on /dev/urandom. I think this implementation does not make much sense and /dev/urandom should _always_ provide output as long as the original seed had enough entropy, but implementations may vary, and you cannot ignore OSX.

<comment><USER2> > _/ dev/urandom in certain systems, notably OSX, at some point may block for > some time_

This is not true. OS X has the same behavior as the BSDs: /dev/urandom is a compatibility symlink to /dev/random, and neither device blocks.

[https://developer.apple.com/library/mac/documentation/Darwin...](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man4/random.4.html)

"Yarrow is a fairly resilient algorithm, and is believed to be resistant to non-root. The quality of its output is however dependent on regular addition of appropriate entropy. If the SecurityServer daemon fails for any reason, output quality will suffer over time without any explicit indication from the random device itself."

The only device node that's broken in this way is Linux's /dev/random.

<comment><AUTHOR> I had to switch implementation to use SHA1 in counter mode in actual code, because on OSX, /dev/urandom blocked. To make it block did not required a huge amount of data.

<comment><USER2> Huh. Well that's a fairly serious bug that someone should track down and document widely. I'll see if I can reproduce it on my OS X machine.

</comment></comment></comment></comment></comment><comment><USER18> I am surprised this hasn't been brought up already: the easiest and most reliable way to generate GUIDs is to use existing APIs, available on near- every platform out there. These blocks of code have been around for years if not decades and have been well-vetted and optimized. Rolling your own is just a poor use of time and invites error. Unless you're doing this for homework or have some free time and are curious about what's under the proverbial hood, don't reinvent the wheel.

</comment><comment><USER19> Please just use 32 bytes from /dev/random by default. If it shows up in profiling data, then think about inventing something else. It likely won't.

</comment><comment><USER20> If you need the IDs to be unique per machine just use a unique-per-machine identifier - like the MAC address of the network card. Then use a counter that increments by 1 for each generated ID. If you need to be resilient to failures - just checkpoint every 10K (or 100K) numbers and add 10K to the starting number when you reboot after failure.

No collisions ever. Seriously - I don't understand why people would overthink it that much.

Not to mention OP talks about MD5 and SHA1's security issues - well guess what? MD5 was never meant to be used for crypto - just validation. Saying it's bad at being used for cryptography like that is like saying cats are a bad war time weapon - true but meaningless.

<comment><USER21> What if your MAC addresses aren't spread that far between each other?

<comment><USER20> What about it? Remember, we're no longer using a hash function on anything - we don't want the numbers to be uniformly spread on any range - just unique.

</comment></comment></comment><comment><USER22> [https://github.com/sixarm/sixarm_ruby_xid](https://github.com/sixarm/sixarm_ruby_xid)

XID is our solution for when collisions do not matter much.

XID defintion: a 128-bit completely random number, generated from an unblocking source of high security randomness. Example of sources: the OS using /dev/urandom, or the language using a secure random class, etc.

XID is compatible with UUID-size-fields in Postgres and any other 128-bit storage system, if you want to save them. The XID idea is quite easy to implement on any system because it's always calling good built-in random tools, rather than trying to home-grow some kind of hash or SHA or masking.

The primary advantage is that naming something an XID tells programmers that it's important to use it as intended. Calling a field an XID means: do not use fewer bits, do not use a less-secure randomness source, do not use an UUID library that sets any of the bytes, etc.

If you would like to contribute XID code for any language, we welcome commits.

<comment><USER8> > for when collisions do not matter much.

Collision, in that scheme, are effectively impossible. It's mostly the same as a UUIDv4. (The link notes this, and perhaps those extra bits are nice; I'm not sure why you'd use a poor PRNG to generate a UUIDv4 as that would effectively be a broken implementation. If you're doing that, what would prevent you from doing the same with XIDs?)

<comment><USER22> Yes you're correct. In practice we've seen many codebases that generate UUIDv4 by a poor PRNG or a codebase-seeded PRNG. For example we've seen bash `$RANDOM % 10` instead of /dev/urandom, Java Random instead of SecureRandom, or misinformed home-grown hashing attempts as described in the article, or a constant seed at the top of the code.

The UUID spec allows these; the XID spec prohibits these.

You asked: what would prevent you from doing a broken implementation of an XID? In a case such as that, an advantage of an XID is a correct implementation is easier to see during code review, easier to verify during continuous integration, and easier to discuss with teams that aren't as familiar with PRNGs, seeds, crypto, and UUID v1-v5. These are people-pragmatic benefits not information-theoretic benefits.

</comment></comment></comment><comment><USER23> I would be very, very, careful about using PRNG to generate unique IDs.

If the ID indeed needs to be unique, I would stay as far away as possible from PRNG. That a PRNG is cyclic with some cycle size that's larger than the number of atoms in the universe does not prevent you from running into repeated sequences in a much higher probability, especially if you're reducing the space of values returned one way or another.

To some extent they're even wanted properties of a good PRNG. If you're using a PRNG whose cycle is larger than the space of distinct values it returns, there _will_ be repeated sequences of length > 1.

If your application cannot handle duplicated Ids, then use an ever incrementing counter concatenated with a serverId, add a checksum for the good cause if you want (it won't add any entropy or reduce the risk of collision)

If you really want to use a PRNG to generate unique ids, use an ever incrementing counter + a serverId + a random number generator. You can probably concatenate them any way you want, as long as the ever incrementing counter is stored in full, but the minute you truncate that one, I wouldn't expect any uniqueness anymore.

If you simply concatenate partial values coming from a PRNG, I would expect the probabilities for a collision to be much higher than cycle_length.

Using a hash function on a counter will still increase the risk of collision that simply using the counter. And using a hash function on a PRNG will also increase the risk of collision compared to the pure PRNG approach.

If your app is fine with duplicated IDs, then go ahead, use a PRNG. It's completely OK. Alternatively if you have a PRNG whose space of values is bigger than the space of UUIDs you're generating I would suspect should be fine. Same if you have a (non pseudo) RNG at hand.

EDIT : added the hash function paragraph.

<comment><USER2> Or use a cryptographically-secure PRNG (CSPRNG), which doesn't have the flaw of a cycle size that will be reached within our lifetimes. (Usually they return 128-bit or more outputs, and 2^128 is a very large number; by comparison, the standard Mersenne twister returns 32-bit outputs.)

For most applications, CSPRNGs are way, way more than fast enough. They're also readily available and well-tested on all current OSes and languages.

</comment></comment><comment><USER24> What benefits does this method offer? The key thing that makes it better than what Mike was doing is to use /dev/urandom instead of Math.random, which isn't always possible (for instance, in the browser). With V8's Math.random, it's going to fail the same way.

<comment><USER2> In the browser you have window.crypto.getRandomValues(), which is a CSPRNG just like /dev/urandom and available in every current browser other than Opera Mini: [http://caniuse.com/#feat=getrandomvalues](http://caniuse.com/#feat=getrandomvalues)

(But, in either the browser or in native code, you should use your platform's CSPRNG directly instead of writing an ad-hoc CSPRNG on top of it.)

</comment></comment><comment><USER25> Nothing new. Just use the right variant for your use case: [https://en.wikipedia.org/wiki/Universally_unique_identifier](https://en.wikipedia.org/wiki/Universally_unique_identifier)

</comment><comment><USER26> Wasn't this method already popularized (basically) by twitter's simpleflake/snowflake?

[https://news.ycombinator.com/item?id=7764254](https://news.ycombinator.com/item?id=7764254)

<comment><USER2> Twitter Snowflake has the additional requirements of being mostly chronologically sorted (events at least 1s apart, and preferably 10ms apart, should have IDs in the right sort order) and using 64-bit IDs, which make the problem harder.

If you're happy to use random, 128-bit IDs, /dev/urandom solves the problem of unique IDs, and very easily fits the performance numbers Snowflake promises without even trying (they want 10k IDs per second and 2ms latency; /dev/urandom on my three-year-old machine does 700k IDs per second and 14µs latency in read()).</comment></comment>


Lisp Isn't Really a Programming Language - <AUTHOR> http://lispy.wordpress.com/2007/10/24/lisp-isnt-really-a-programming-language/ <comment><USER2> Someone please explain to me how this article, which adds nothing to human knowledge, was posted with some intention other than to cull karma points from those of us with a weakness for anything Lisp-related.

That article about the perverse incentives that emerge from the gamification of discussion forums is starting to weigh on me.

<comment><USER3> I agree the article isn't very strong, and it's from 2007. Nevertheless, I think some of the points could result in an insightful discussion with posts from people who can say something about Lisps (or DSLs) and (ideally) how they applied to their startup. I actually upvoted the submission in that hope.

For example, the author points out the importance of "first class procedures" to Lisps' usefulness to create DSLs whereas uniform syntax, code-as-data, macros, and the REPL seem to be at least as relevant. I would have loved to read reputes or points in favour by people with actual experience using Lisps writing DSLs for their business.

Another point fromthe article: Lisps having trouble with programming at the large. The article doen't get very specific here, but hearing how companies like ITA (presumably) solved those problems (if they are even real) would be awesome. And highly relevant to a software startup toying with the idea of using a Lisp as part of the technology stack.

It would be a lot better to read contemporary, amazingly well written articles about Lisps which are (ideally) relevant to startups (where are those posted ?) but accusing the OP of culling karma points sounds a tad harsh to me :(

</comment></comment><comment><USER4> I groan every time I see someone advocating building data structures out of cons cells. I use Lisp at my day job, and I can tell you that some of the hardest code to maintain is the code that uses lists instead of defstruct. Once you need to add a field to that structure, you have to manually trace down every spot that uses it, and make sure it can cope with your longer list. Last time it turned out to be easier to just replace the list with a defstruct.

<comment><USER5> Building data structures out of pairs is one of the features of Lisp that introductions to the language tend to focus on, (particularly in academia) as it _feels_ very simple and elegant. This kind of disconnect between theory and practice is part of why I often find it hard to take writing about Lisp programming at face value.

</comment></comment><comment><USER6> I'm trying to wrap my head around "thinking like a language designer" when approaching software dev. It's the viewpoint in this article that I'm intrigued by these days - that building DSLs in Lisp is a source of great expressiveness in coding.

<comment><USER7> A trillion years ago, I had to get 50 Lisp machines speaking in an SNA network to American Express' IBM mainframes. The programmers of two companies got our network engineers together, and we designed a protocol to minimize network overhead and still be all robust, fast, reliable, recoverable....

American Express mainframes were available for our use six months down the road, at 2am and for 2 hours. Once a month. They didn't have (or offer us) any sort of testing environment. We went live at 2am for two hours and could debug our code after that offline. At least that was the common Amex procedure.

So I wanted to build our half of the protocol, plus a simulator of their half the protocol.

What I ended up doing was creating a DSL for describing the finite state machine at the heart of our protocol. Allowing the user (me) to easily specify the parameters of each state and associate them with behavior. Timeouts, transitions, actions to take, error conditions, etc.

(def-state ...)

Upon doing that my simulator basically fell out trivially, and we could test the network, test our responses, inject errors, all sorts of fun things.

It's 2am at Amex and we're going live and many people at Amex dislike our crazy group with our non-IBM machines and they'd love to see us fail. And guess what? It doesn't work. American Express' mainframe code implementation of or protocol is just wrong and not what we agreed to.

Eh whatever. It took 30 minutes to confirm there was a problem, another 30 minutes to figure out what the erroneous state implementations were doing, and then instead of going back to cry at our hotel, I just changed our protocol to match theirs, and ... it worked.

Not as exciting as saving the Apollo moon landing, but it's my story.

So I was able to "think like a language designer", and I created a language very specific to our needs in Lisp. Describe a communications protocol and decorate the states with the constraints and behavior you need.

And at 2am, it was very nice to be able to "think like a finite state machine" developer, and just focus directly on re-arranging the states and their transitions and be confident the underlying machinery would deal with the rest.

fwiw.

</comment></comment><comment><USER8> _Any procedure you write becomes a part of the programming language– your procedures are indistinguishable from the built-in ones. You don't write Lisp code so much as you extend the Lisp language until it becomes a custom language for whatever it is you're trying to do. Its a subtle difference, but a significant one._

Yes, and you can do the same thing when you extend the type system in C++, or C#. The ability to extend the type system to allow the eventual DSL created to integrate is a key consideration, and LISP is a leader in this area, but the important thing to realize is that you should work at the level of DSL, you should become a Language-Oriented Programmer.

<comment><USER9> You can, but you can't change the meaning of if or #define.

In Lisp (like Forth, where I learned it) it's not like "first class procedures" but "all names are created equal".

At least until you take the red pill and grok macros, but that's a story for another day.

When you extend types you don't create a DSL - you create a domain-specific object hierarchy that fits within a given language.

<comment><USER8> You're arguing a technical detail. I agree with you, but in my opinion it's not important, so I'm not going to chase down every little language option here out there. It would turn our discussion quickly into a weird kind of trivia contest.

The point is that understanding DSLs is a key concept for a programmer. Wrapping that up into your toolbox gives you a huge advantage. From there you can appreciate (or not) these other things.

<comment><USER9> I see what you mean, but creating a DSL on top of a grammar like C's is more like creating a jargon than a language. Like when you catch two astronauts talking, you can't make out any of the nouns, some of the verbs, but the structure is still familiar - it's English (or Chinese, or Russian) with a new set of nouns and verbs. You don't have a domain-specific language - you just have domain-specific words.

Languages such as Lisp are uniquely well suited for that because you can redefine almost anything, including language parts that other languages consider reserved words. With it, you can create other language that's free to create not only its own verbs and nouns, but its own grammar rules.</comment></comment></comment></comment>


What's new in CPUs since the 80s and how does it affect programmers? (2016) - <AUTHOR> https://danluu.com/new-cpu-features/ <comment><USER2> No, the 80s were not 8b. The 68000 was 32b. The 8088 used in the IBM PC was 16b and then quickly changed to 32b with the 80386 in the PC/AT. The Apple II started at 8b but changed to 16b with the IIgs.

I didn't see _superscalar_ mentioned. But I saw some close synonyms; so I'm good.

However, I didn't see μop caches. The x86 tax is pretty small in 2017 and it was pretty expensive in the 80s leaving the door open for RISC. That's definitely missing.

<comment><USER3> Not all eight bit, but 32 bit was really more of a nineties thing.

The first 386 PC didn't come out until 1987, but hardly anyone had them until about 1990. The 68k was a hybrid 16/32 bit processor, and the IIgs didn't come out until 1987 and hardly anyone bought one.

If you were to go into someone's home or office in 1989 and see how many bits their computer had, it was overwhelmingly likely to have been 8 or 16.

</comment></comment><comment><USER4> I think the biggest change is that as long as I follow a set of best practices, I never have to worry about performance. It's always good enough. I can spin up 5 docker containers with a copy of my program running in each, on my 4 year old laptop, and performance is still not an issue.

</comment><comment><USER5> Adrian Colyer had recommended this in one of his posts.</comment>


Unconditional Basic Income Based on Ethereum - <AUTHOR> https://hack.ether.camp/idea/unconditional-basic-income <comment><USER2> >> My dream: This new Ethereum based token system eventually would replace the CHF (Swiss Franc). Let us transform UTOPIA into REALITY. >>

Well...</comment>


Facebook, ConnectU settle dispute - <AUTHOR> http://www.boston.com/business/technology/articles/2008/06/27/facebook_connectu_settle_dispute/

<comment><USER2> I'm actually surprised they (ConnectU) won this case (or Zuck buckled), from the sounds of things a new social network idea was "in the air" at the time and several teams were close to launching something similar.

Who's to say ConnectU had an exclusive "right" to this idea? They simply hired a freelance coder aka consultant to hack away and _surprise_ he though it was a good idea and made his own (apparently more popular) version.

<comment><USER3> A settlement doesn't mean either side won. You'd have to know how big it was before you could say that.

<comment><USER4> What's important to note though is the general flow of money from non-rowers to rowers.

In all seriousness though USRowing announced this morning that they made the pair for Beijing, so not a bad week for them. I look forward to watching their race on TV later this summer.

<http://www.row2k.com/olympics/features.cfm?ID=1191>

</comment></comment></comment><comment><AUTHOR> So basically the judge ordered zuck to give the connectU guys some money and options.

<comment><USER5> That's not what the most recent development is about.

They had a settlement a while ago the terms of which had been undisclosed. But the ConnectU guys apparently decided that they wanted more, so they tried to reopen the case (which is in general not a done thing after you've settled.) But the judge said they could not, i.e., that they had to take what had been agreed on previously. I'm not sure whether this is final, maybe they can appeal, or take it to yet another state or something.

</comment></comment><comment><USER6> idea != execution

<comment><USER7> well he did borrow some code/features so I guess they did have some claim. But yeah its a good day for those guys because they get paid w/o really doing the hard work.</comment></comment>


This high-tech card is being rolled out by French banks to eliminate fraud - <AUTHOR> http://www.thememo.com/2016/09/27/oberthur-technologies-societe-generale-groupe-bpce-bank-this-high-tech-card-is-being-rolled-out-by-french-banks-to-eliminate-fraud/ <comment><USER2> This fits so well into the existing CVV code mechanism!</comment>


So maybe the slackers had it right after all - <AUTHOR> http://www.boston.com/bostonglobe/editorial_opinion/oped/articles/2009/02/09/so_maybe_the_slackers_had_it_right_after_all/ <comment><USER2> _We brought you the Internet_

I stopped reading there. "You" did what? Is the author suggesting that "slackers" brought us the internet? It seems to me that a vast army of workaholic scientists and hackers of all types "brought us the internet", not a bunch of wannabe artists working part-time jobs at Starbucks.

Perhaps I'm missing the point of this article, but it seems overly loose and unjustified, and filled with fallacies. Freelancers aren't slackers, they work harder than people in regular jobs, in most cases. Hackers aren't slackers - they have many characteristics of slackers, perhaps, but if you get down to it, most of us are obsessive, driven workaholics - for the right work.

<comment><USER3> I think you are missing some nuances of what it means to be a Slacker. It's not just about work or non-work. It's also about a kind of passive, almost anti-social way of assigning a low value to things that most of society considers important.

I get the point about slackers bringing the internet. The internet may have been invented for "workaholic scientists" to scam more grant money out of DARPA, but it is what it is today due to the persistent, unstoppable, abuse of employer's computers and resources for non-work related activity.

It takes a slacker to show up to work early on Monday morning to use the faster internet connection to browse ebay.

If so much internet usage wasn't on employer's computers, there would less incentive to use javascript and AJAX, because it would be easier to get people to just install desktop applications.

<comment><USER4> The Internet != the WWW

</comment></comment></comment><comment><USER5> He makes one good point, and that's that they lived lives they could _afford_. When you waste money on frivolous things like replacing a car because it's 'old', even though not a single warranty has run out on the vehicle, is going to place you in a very bad position. I'm sure lots of people have lost cars because they missed a few payments and then all of the money they had put into it is gone too.

Personally, I aim to never 'finance' something, aside from the house I buy. I aim to never have credit card debt, that my cards are completely clean before the end of the month.

Another thing, I want to live a life where I can afford 100% of my life, that I don't have to rely on my wife to work so that on the chance one of us loses our job we don't have 50% of our expenses to cut, we only have 10-20%.

<comment><USER6> Yeah this is a great point and its a lesson the entire US economy has completely forgotten. The last decade - really the entire period after 1980 - is one big credit orgy. We really really really need to learn how to live within our means again and stop our debt-fueled overconsumption binge.

The last few years have been particularly disgusting. People competed to get ever-bigger and fancier houses, cars, and various toys that they really did not need.

Its time to start spending only what we earn as a nation, and individually.

<comment><USER5> Right now I'm desperate to buy a couple of games. One is Fable 2 because I loved Fable, but I'm not spending $60 on a game, I'm just waiting for the drop to $20 that inevitably happens. The other game is Fallout 3, I've been a huge fan of the series and I want to look at the 3rd, again I'm waiting for the drop to $20 however this doesn't look like it's going to happen anytime soon as they jacked up the price here in Canada from $60 to $70!

I worked as a game reviewer for a number of years, and this is perhaps why I can value a video game much better than most other people. I reviewed many a game that I wouldn't ever justify spending $5 on.

I mean it's like the extended warranty they try to sell you on games. Whenever I buy a DS game, they always ask me for extended warranty (It's their job, so I don't snap at them) but the SD cartridge a DS game uses is virtually indestructible through normal accidents. I've had one go through a washing machine with suds and everything in and I took it out, peeled the remnants of the label off and continued playing the game. I stepped on one on a concrete floor in boots (it fell out of my pocket when I grabbed my iPod, tangled up in the headphones or something) and no one would be the wiser. Yet they ask me if I want to spend $3 to insure something that'll survive me: if I fall off a skyscraper, if I fall in the ocean and drown, get hit by a car and numerous other things.

<comment><USER5> _addendum: Something I forgot to add. I come from the UK, but I'm living in Canada. It would currently be cheaper to buy Fable 2 and Fallout 3 from the UK and have them shipped over; sadly the whole region code bullshit prevents this. Usually it means Europe pays like double the price of NA, however now that the economy is going to craps in the UK the prices for games have been_ put down* unlike Bethesda in NA who seem to think putting up the price of a game will make them more money.

</comment></comment></comment></comment><comment><USER4> The gist of this article seems to be "Having gained nothing, we have nothing to lose."

<comment><USER7> 'Tis better to have loved and lost than never to have loved at all.

I wonder what he thinks of Tennyson.

<comment><USER8> I think it's a bit of a stretch to say that you "love" your big house, expensive car, and extravagant purchases in the way Tennyson meant "love" in that quote

<comment><USER7> A massive stretch. My intention wasn't to suggest that I/you/we/them 'loved' our houses/cars/jobs but that you could substitute loved for your activity/goal of choice and the idea still holds true.

</comment></comment></comment></comment><comment><USER9> It would have been nice to see some facts or figures verifying that his anecdotal views accurately reflect some significant part of the "Gen X" population.

<comment><USER10> But then it would stop being a superficial generation-piece, you see.</comment></comment>


Use of Portable Screen-Based Media Device and Sleep Outcomes - <AUTHOR> http://jamanetwork.com/journals/jamapediatrics/fullarticle/2571467 <comment><AUTHOR> From the PDF (linked in the article):

 _CONCLUSIONS AND RELEVANCE To date, this study is the first systematic review and meta-analysis of the association of access to and the use of media devices with sleep outcomes. Bedtime access to and use of a media device were significantly associated with the following: inadequate sleep quantity, poor sleep quality, and excessive daytime sleepiness. An integrated approach among teachers, health care professionals, and parents is required to minimize device access at bedtime, and future research is needed to evaluate the influence of the devices on sleep hygiene and outcomes._</comment>


GitLab Flavored Markdown (GFM) - <AUTHOR> http://doc.gitlab.com/ce/markdown/markdown.html

<comment><AUTHOR> I can't tell if this is exactly like GitHub flavored markdown or not...

[https://help.github.com/articles/github-flavored- markdown/](https://help.github.com/articles/github-flavored-markdown/)</comment>


Zbigniew Brzezinski, National Security Adviser to Jimmy Carter, Dies at 89 - <AUTHOR> https://www.nytimes.com/2017/05/26/us/zbigniew-brzezinski-dead-national-security-adviser-to-carter.html <comment><USER2> He may pass away but the damage he (and his friends) did to US will live on.

[https://youtu.be/kYvO3qAlyTg](https://youtu.be/kYvO3qAlyTg)</comment>


Ask HN: Is there any umbrella as a drone - sahin-boydas I personally dont like a direct sun (btw 11am-4pm)
While hiking or on the beach i want to drone (with an umbrella) to make shade and follow me whereever i go.
Is there any drones to do that? <comment><AUTHOR> Drones are noisy. Get one of these: [https://www.amazon.com/dp/B00DY5YWGQ](https://www.amazon.com/dp/B00DY5YWGQ)

</comment><comment><USER2> There is in the slack demo video. Maybe you can convince Geoff Lion to bring it to production.</comment>


Ask HN: Am I'm being unreasonable about NDAs? - <AUTHOR>

A couple of days ago, I got a call from an old coworker looking for a UI developer for website he is building for a partner, knowing I do freelance work and that my work is the sort of work he is looking for. He is a developer, his partner is not.
We setup a call to go over some of his wireframe designs to get an idea of effort. Fifteen minutes before the call (a full day and a half after scheduling the call) he emailed me an extremely broad NDA that his partner wanted me to sign before we could talk about anything. At this point, all I know is that he wants me to do some "basic CRUD UI work" (his words). I didn't even know what the project was supposed to do. This NDA covered for 5 years even the basic UI design concepts of a "basic CRUD (website)".
So I sent him a link to this (http://blog.jpl-consulting.com/2012/04/why-i-wont-sign-your-nda/), I didn't sign the agreement, and we had a brief call in which we talked about the other people he's interviewed, the fact that all they have are the wireframes so far, other projects I'm working on, and the fact that they can't even get close to my current rate, let alone what I want to charge them.
I don't like willy-nilly signing things just because someone asked me to. I read the things I've been asked to sign, and with increasing frequency these days, I find terms that I don't like. My wife thinks it's just "part of doing business", that it's unlikely to harm me (us, I point out) to just sign these NDAs and get on with it, and that I'm cutting off my nose to spite my face. She granted that the rate wasn't enough, but was concerned that I miss out on too many opportunities because of my reticence.
Is it just me, or is the market getting increasingly hostile/combative? Or am I too open with my own ideas? She is right, I have turned down a lot of projects lately, but they've all come with similarly bad terms. <comment><USER2> I signed a _mutual NDA_ the other day that wasn't too bad. It exposes both parties to the same risk and was consequently very reasonable in its demands.

Ask them if they would be willing to sign a an NDA that precluded them from using "your" ideas [anything you tell them during the first meeting] in their web site? That might make them think about what they are asking.

That said, they sound completely clueless and I would pass if they insist on the crazy NDA. As a general rule, clients that start out unreasonable or cheap do not get better.

</comment><comment><USER3> The presumption about the inapplicability of NDAs is specific to advice and funding pitches. It is very much _not_ the norm in contracting work; serious clients will routinely demand that work happens under NDA, and Confidentiality is very much a market term in contracting master agreements.

It's reasonable to refuse NDAs prior to execution of contracts (though for boilerplate NDAs, I'd tend not to bother pushing back). For everything else, I guess "reasonable" is what you make it, but "why I won't sign your NDA" articles probably won't make it sound like you're the professional in the negotiation.

</comment><comment><USER4> I don't sign them anymore either. My explanation is a little simpler. NDA's are contracts. I don't sign contracts without having them reviewed by lawyers. Lawyers cost money. If the contract doesn't come with some kind of payment, I don't sign it. So I don't sign NDA's.

</comment><comment><USER5> I'm increasingly feeling that NDA = Naivety, and is a useful signal of a startup founder who is in love with their idea but doesn't appreciate that execution is everything, so will undervalue everyone else's contribution (including yours) because 'the only reason we're all here is because I had the great idea'.

Definitely not universal, but common enough (in my personal experience) to act as a very useful guide. If I get resistance (about half the time the person is happy to talk with me anyway) a good follow up question is "Who are your 3 biggest competitors?"

If they can't name them, then they haven't done any market research either and their idea was likely conjured in a basement with no validation.

"NDA Request + No Market Research = Solution in search of a Problem", and I'm not going to lose any sleep over not taking those meetings / missing those clients.

</comment><comment><USER6> There's no need to be reticent.

What I've found helpful is to start billing for all customer interaction immediately after the initial meeting.

This includes any time I spend drawing up proposals, vetting specifications or customer meetings.

Most of all, this also includes any legal costs I incur if the project requires me to sign complex legal agreements that will need to be vetted by my own counsel.

The thing is, from the moment a customer starts talking to me they are making use of my time, expertise and personal resources.

Because these things do not come to me for free they have value both to me and to my customer.

If they are recognised as having value it greatly decreases the likelihood that my time will be wasted and increases the probability that my customer's requirements will be met.

When I first started doing this about five years ago it did mean that I lost a lot of "opportunities" in the beginning.

Fortunately this also meant I now had time in my schedule to accept more lucrative and enjoyable opportunities with folk who were far more concerned with the quality of my work than my willingness to sign complex legal agreements at the drop of a hat.

Take a lesson from those very same lawyers who draw up NDA's!

Have you ever heard of one who would spend more than five minutes of their time, expertise or resources on your problem if you weren't going to be paying for every single dollar of it? :-)

<comment><USER7> >Have you ever heard of one who would spend more than five minutes of their time, expertise or resources on your problem fi you weren't going to be paying for every single dollar of it?

Yes, absolutely. All the time. For example, many lawyers will give you a free consultation much longer than 5 minutes to help determine if something is worth pursuing.

</comment></comment><comment><USER8> Everything is negotiable. If they present you with an NDA that you aren't comfortable signing then counter with something you are willing to sign. These things are negotiated all the time.

Not that long ago I was presented with a copyright assignment contract that if I signed would allow their lawyers to enter into arbitrary agreements for me without even telling me. I simply emailed them back and asked them to remove that clause. They did without complaint.

And just today I presented a Statement of Work to a client and we exchanged emails over making sure the rights to the work were defined correctly for what they wanted. I had intended to allow them to do what they were asking but my original wasn't clear. So I reworded it so it was clear to everybody.

</comment><comment><USER9> >> it's unlikely to harm me

It's unlikely to harm you if you sign it, and it's unlikely to harm the business if you don't. Why should you be the one to give in and not them? I refuse to sign documents when I don't accept the terms, and I refuse to sign documents when I'm asked to sign them without enough time to read them. I use this as a filter for people I don't want to do business with. I don't like doing business with people who I don't trust and who don't trust me. I'm happy to sign an NDA if the person wants me to, but if it's obvious they had a lawyer write it carefully, I want time to have a lawyer read it carefully.

</comment><comment><USER10> It's a coin toss for me. Sometimes I'm hostile to them, sometimes I'm not. It really has more to do with the attitude of the person who is presenting it to me.

If it comes across as "I'm really scared and I don't know what I'm doing, so will you please sign this?" then I try to cut them some slack.

If it comes across as a show-of-force or a veiled threat that I better not double-cross them in the future, then I walk away.

</comment><comment><USER11> It's not about being hostile/combative or you being too open; it's business.

When a company (or person) asks you to sign a contract, it's an offer presented and written entirely for their benefit. There's no reason at all to attempt to make it "fair" \- nor should they. It's your job to take care of your interests and to walk away or push back. Their only interest in trying to make the contract amicable is to seal the deal quickly and/or to not burn bridges.

This is true with everything. If you want to buy a house, the offer you make should be about getting the most for your money. Mentally, you may want to be "decent" with your offer, but that's really just about trying to close the deal quickly before another offer is presented to the seller.

<comment><AUTHOR> I understand that, which is why I didn't just ignore the guy and stand him up for our call. What I mean about "increasing hostility" is that that gap between what is asked for and what is decent seems to be growing. 10 years ago, I didn't have to sign an NDA just to get an interview, and the non- compete when I actually _took_ a job had a 50 mile radius and was only a year long. Nowadays, people want a five year commitment just to talk?

</comment></comment><comment><USER12> Why not flip it and offer them your "standard NDA" with more reasonable terms? If they don't want to sign it due to having to incur legal expenses to check its all above board then they can't expect you to have to do the same with their NDA.

</comment><comment><USER13> That's so generic - "basic CRUD(website)". It's ridiculous. You're a UI developer, of course you're going to design a UI for CRUD functionality in the next five years.

My problem with NDAs is that even if the company decides to pivot and abandon the "idea" altogether, you are still bound by the NDA for that time frame. It restricts creativity. Shows a lack of trust. Etc. In my experience, those who have the worst ideas, who have no understanding of what it takes to execute said idea, are generally the ones who shove an NDA in my face before I even say, "Hello."

[https://github.com/mjhea0/pinky-promise](https://github.com/mjhea0/pinky- promise)

<comment><AUTHOR> I'm actually an everything-developer and some of the wording of this particular document isn't clear on how anyone would prove whether or not I had access to the non-UI parts of the project, so how would I even go do non-UI work for someone else and still be in compliance?

One point I saw expressed in the past on NDAs is that, if you don't know anything about the project before signing, how do you know you don't _already_ have a conflict of interest?

I'd be fine if the NDA covered a much more limited scope (say, it covered only official trade secrets and patents) and it came as part of an actual work contract. But to _start_ a discussion with an NDA...

Is this just to be expected, that there is a high degree of amateur-hour shenanigans like this and I just have to slog through them? I'm fine with slogging, but I can see my wife getting anxious if I'm turning down most projects that come my way.

</comment></comment><comment><USER14> Would it be worth offering your own NDA as an alternative?

But in general asking you to sign an NDA is a good indication that they're not serious.

<comment><AUTHOR> Well, I have a friend who is in contract law and we just so happen to be getting drinks tonight, so I will ask him about the concept.

</comment></comment><comment><USER15> _My wife thinks it 's just "part of doing business"_

Refusing to enter into agreements is "just part of business" too. Creating an atmosphere where signing overly broad agreements is commonplace is a _negotiation tactic_ for getting more and more favorable language into those agreements.</comment>


Ask HN: How did you learn DBMS? - <AUTHOR> I am a UG student and DBMS is the worst subject to study for me . All the books are too dry and the online courses are too boring and meaningless . Please help me pass in this subject. <comment><USER2> If you want a broad overview of how RDBMS work under the hood, "Designing Data Intensive Applications", would be a good conceptual start.

This could be followed by database internals books like "Expert Oracle Database Architecture" and "Pro SQL Server Internals", irrespective of whether you use these databases or not, you will learn a ton of stuff about database internals and system design.

If you are interested in database schema design etc, then look up "The Database Model Resource Book" Volumes 1,2,3. None of the above are quick reads but they are solid foundations for becoming a well rounded DBMS professional.

</comment><comment> open-source-ux If you want to learn the basics of creating a database schema (i.e. creating tables, defining relationships, normalization etc), this Lynda (now LinkedIn) course I think is the best for beginners. It does require a subscription to Lynda/LinkedIn to watch which may not be practical.

Here is a video excerpt from the course to give you a flavour of the instructional style:

[https://www.youtube.com/watch?v=V5DyvUfsboA](https://www.youtube.com/watch?v=V5DyvUfsboA)

</comment><comment><USER3> Are you talking about structure of DBMS? Or how to use them? What are the exact topics you have to learn and are struggling with?

<comment><AUTHOR> I mean topics like these

[https://www.youtube.com/watch?v=5fs1ldO6B5c&list=PLxCzCOWd7a...](https://www.youtube.com/watch?v=5fs1ldO6B5c&list=PLxCzCOWd7aiFAN6I8CuViBuCdJgiOkT2Y&index=6)</comment></comment>