Ask HN: What are some technical topics I can blog about? - <AUTHOR> I want to start writing a technical blog (related to computer science and development), but almost every topic I think of has been written upon by someone, probably better that what/how I would have written it. <comment><USER2> Blogging should be less about immediately building an audience and more about gaining a greater individual understanding for the topics you blog about. You might also find that with each post, you learn something new about writing, style, etc and will grow embarrassed about your original posts. You will learn how to communicate better, write better and gain a greater understanding of your own opinions by blogging even if no one ever reads it.

For those interested, i wrote a blog post on this exact topic[1] about a year ago.

1: [https://blog.benroux.me/untold-benefits-of-a-software- blog/](https://blog.benroux.me/untold-benefits-of-a-software-blog/)

<comment><USER3> Ended up reading bunch of your blogs. Nicely articulated. As a developer, communication with analogies really helps :) cheers!!!

</comment></comment><comment><USER4> The best inspiration comes from the development work you are doing for work or a hobby project.

When you start something new or run in to an issue doing something create an article.

Detail what you are doing and what documentation your are following. Outline the steps, pitfalls/potential pitfalls and how to overcome them.

Almost everything we do whether something new or doing something new detailing the steps and providing tips to complete it or improve it is going to help someone coming down the same path after you.

So take inspiration from your own work.

If you use a framework or language that's a good topic to dump all the knowledge you come across for others following in your footsteps.

Every topic has been written about, but there is always new versions of everything so detailing the steps again and including anything missing from the docs will be helpful to people.

<comment><USER5> Previously I had a blog where I wrote about any issues I ran across while developing, or anything that required a decent amount of research to solve. I would regularly reference it, and other people found it useful (based on the traffic I received).

<comment><USER6> Why did you stop?

<comment><USER5> It was a wordpress website that I ran 5-10 years ago, and I just got tired of maintaining it. I've been looking at spinning up something similar using Jekyll and github pages.

<comment><USER7> I went through a similar transition. There is much less friction editing a quick post in markdown with Jekyll than with the heavy wordpress UI, much happier with that setup.

</comment></comment></comment></comment></comment><comment><USER8> I tried going down your path and blogged only about stuff that's arcane or interesting tech wise, and it did nothing but cause me writer's block and turn me off blogging.

Learn to write for yourself first. If you set up Raspian on a Raspberry Pi over the weekend, write about it! If you popped a CentOS install disk and set up a server, write about that. It doesn't matter if there's 10000 blog posts about the same exact thing, you can turn even mundane topics interesting as long as you have a good writing style- and that's what you're going to be exercising by blogging.

<comment><USER9> This is good advice. I too have a personal blog that I mostly neglect. This past week we "cut the cord" on our cable TV service at home and the process has inspired me to blog. I've been composing blog posts "in my head" for the past few days and I take this as a good sign about my future intentions.

I have thoughts on Xfinity's value, YouTube TV's ad policies, Hulu's DVR restrictions, Roku's awesome interface - all good useful resources for those researching the same process.

In contrast, some weekends I'll sit down (without an idea) to compose a new blog post and frequently hit a wall.

<comment><USER10> I'd be very interested in seeing your thoughts on Roku :)

</comment></comment></comment><comment><USER11> I wouldn't worry about whether someone else has written about a topic.

Worry about being the best written explanation.

For instance patio11 has gathered a huge blog audience, and he didn't do that by writing about things no one else had written about, or knowing more then everyone else.

But his writing is fucking amazing, and that's why I can read 20 pages of his writing while being barely able to make it through 3 paragraphs of other authors.

</comment><comment> oh-moses Everything has been written about multiple times, don't worry about it.

If your blog is the first place where a reader runs into a particular information or insight, they will find it valuable, even if chronologically, someone else wrote about it first.

There are like three people in the world who have original ideas (the only example I can think of right now is Robin Hanson), but the number of people with successful blogs is much higher.

</comment><comment><USER12> This is kinda similar problem to the advice given of "Build Something" given to new programmers. For a long time, I thought that meant "Build Something completely new and fascinating" and I would spend days trying to find something to build, see examples of it already present and give up. Recently I have realized it doesn't really matter. Sublime text had the first release in 2008, a time when I would have said Text Editor market is saturated. Visual Studio Code was released even more recently, and still gained sufficient market share. Now will you write the next Sublime text? Probably not, but that doesn't mean writing a new text editor, music player, heck even a todo app is a bad endeavor to learn. And it'll be really hard to write sublime without writing a notepad clone.

My main point here is, even if you are writing about the most mundane topic, in CS there is bound to be something, a different command line flag, a different point of view, something old rediscovered etc. just by the virtue of writing on it. Will it happen on your first attempt? Probably not.

You can start to write about the most mundane or the most esoteric thing. Only with practice would you find a niche, and there eventually will be some gems.

</comment><comment><USER13> > but almost every topic I think of has been written upon by someone, probably > better that what/how I would have written it

That's a defeatist attitude that will sap your energy and make sure your blog is short lived.

Now, I definitely understand the sentiment, because there are a lot of smart folks out there writing on the internet. However, it simply isn't true that you don't have anything to say, even on a topic that has been written about over and over again.

What I'd suggest is writing about something that you are passionate about and willing to investigate. And I'd suggest primarily writing for yourself and your understanding rather than to be a famous blogger or find a job (those might be byproducts, but they're unlikely, whereas gaining knowledge is pretty much guaranteed).

The topic could be a problem domain (real estate tech, fintech) or a specific technology (AWS RDS, Google cloud spanner) or even development techniques (TDD, mob programming).

Pointing to other interesting posts and riffing on them is a great way to get started, but do be prepared to spend some time writing original content. Don't feel you have to find your perfect topic immediately, you can wander a bit.

Source: I've been blogging since 2003.

</comment><comment><USER14> Two ideas that come to mind:

Quantum computing understandable for simple tech people (not quantum physicists). There is so much noise (as in SNR) on the internet about this topic, and I think I have a reasonable grasp of it, but I don't have a big audience nor the time to write it all down. A good source on that would be great.

Machine learning: where are we and does it hold any promise for future work, or is it a dead end beyond optimizing what we're already doing with it? Neural networks sounded like "oh, with enough compute power, we can simulate a brain right?" but so far the models show no level of true understanding whatsoever (to the best of my knowledge).

\</comment><comment>

While writing answers on the IT Security StackExchange website, I often find that answers of mine which I found dull and uninteresting (they logically follow from basic knowledge) are popular in terms of views and votes. Usually it's somewhat predictable, but I'm regularly surprised by what people find interesting and useful. One example was about receiving email without a "to" field ('how did it end up in my inbox?'), which I thought was a niche question (only people who run their own mail server would have that, I thought, and they know SMTP right?), but 80 upvotes tell a different story.

And like other commenters said: it's not so much about what topic you choose, but about how well you can explain it. Of course pageviews is your quality of writing multiplied by the general interest level (bad quality but huge interest might still get you a lot of views), but most of the time there turn out to be a lot of people interested if you only explain it well, so the quality matters more than the topic.

</comment><comment><USER15> What do you know?

If you want to write about what you know, do it. Even if someone else has written about it, you may write about it differently. Maybe your "voice" will reach people that didn't like another blog post about the same subject.

If you decide, as saluki suggested to write about something you don't know; do as he suggest and provide details and references. This could be more interactive, if people are trying to learn along with you.

The key is to write -- both on schedule and as well as you can. Adhering to a schedule means people can easily follow along and know when you are posting. The more you write, the better you get.

</comment><comment><USER16> Stack Overflow diving for otherwise poorly understood concepts can be a good starting place.

I wish there were more good blogs about testing, refactoring and teamwork on Rails projects. Not idealized forms of it, but talking about _real_ refactors.

If you manage to bridge the gap between the real world and theory, that is wonderful. Show me how in a 100k LOC Rails app that's 10 years old how to refactor my User class to obey SRP and I'll follow your blog for life.

</comment><comment><USER17> There are articles about really interesting subjects, but I can't get through them because of the way they're written. Conversely, there are articles about not very interesting subjects that I devour because they're well written. Don't worry about what others write about, just pick subjects you enjoy and keep writing and practicing. Those are the things that show.

</comment><comment><USER18> It's better to write about stuff that you've just learnt. Fixed a tricky bug, learnt about a new API, found a useful library? Write about it.

It'll cement the knowledge in your mind, and perhaps you'll have insights that others haven't had. If you're aiming to write about stuff no-one's ever written before, you'll never get around to actually writing anything.

</comment><comment><USER19> I don't think it's mandatory to write about novel or innovative things. It's your blog, you can write what you want.

Agree with the write for yourself mindset.

I am kind of doing the same thing on my blog [https://flaviocopes.com](https://flaviocopes.com) where I write every single day (personal challenge) about some particular thing related to Web programming, and I mainly write for _me_ , because I don't have a good long term memory and every time I need to use X I reference what I learned n months ago about it. That's much better than searching again and again "that post" you remember that clarified the thing for you.

Turns out this is useful for other people too, as I can see in the positive feedback I get.

After some time I started rewriting old posts to improve them / add more things I learned, as your writing style evolves.

So, my advice is, just start and stick to it.

</comment><comment><USER20> I have a popular Apache Spark blog on Medium ([https://medium.com/@mrpowers](https://medium.com/@mrpowers)).

Spark is a niche technology and there isn't a lot of competition. I rank #1 on Google searches for common searches like "spark null", "testing spark", and "spark udf". I haven't done any SEO - I just write what I need to teach my coworkers and Google has picked up my articles.

I'd look for a rapidly growing technology that's relatively new. That'll give you good opportunities to write blogs that rank #1 on Google without doing any SEO.

I am writing all my new posts on a new domain ([https://www.mungingdata.com/](https://www.mungingdata.com/)) and it's harder to get traffic. So Medium might be a good place for you to start.

<comment><USER6> > it's harder to get traffic

Import your content into Medium (aka "republishing") and you can keep your new blog and still get the popularity boost from your existing Medium blog: [https://ryanbattles.com/post/reposting- content](https://ryanbattles.com/post/reposting-content)

</comment></comment><comment><USER21> I'd take a subject that busy engineers would be interested in knowing more about but don't have the time it take to investigate it. I.e. going in depth about how the chrome debugger work in javascript to analyze performance. I remember reading a blog post about it and a few weeks later it really helped me.

You could write about new programming languages or new algorithms that just came out. Anything with nice animation is a plus. (I.e. to illustrate the algorithm)

Another thing that I find interesting is interviewing great people in the field. Often, there are questions I wish I could ask them that most other interviewers don't because they're not technical enough.

You can write about weird bugs that you encountered, how you fixed them and what lessons you learned.

</comment><comment><USER22> If you're working with new stuff at work, documenting edge cases is always interesting. For example my blog was the only resource on the web for a lot of Oracle point-in-time recovery techniques when they rolled out that technology. I was just implementing it for a customer and documenting DR scenarios and testing them. I wasn't even really doing it to blog, more like advanced note taking in case I needed it in the future, also the knowledge that an audience would be looking makes you take care, not make assumptions about pre-existing knowledge. In other words it improves your technical writing skills.

</comment><comment><USER23> If you're just starting a blog/technical publication, there's nothing wrong with casting a wide focus and writing about many barely related topics. As you get some articles written/published, you'll learn more about what you're good at, what you enjoy and what brings the most useful traffic.

At this point, you'll be better served by building a publishing habit than picking the mythical perfect niche. But, if you're concerned, in my experience, all the good niches either have huge amounts of competition or they're so incredibly bleeding edge that they're risky to learn about.

</comment><comment><USER24> Think of yourself going on a journey, a journey into the technical world. Where you talk about your development skills, your technical tact, your debt and how you go about them each and every day. Writing down your inner turmoil, thoughts, moments of brilliance, or moments of despair and frustration is one of the most valuable things you can share with someone. Along with tips, hacks, and tricks of course. It also forms valuable research for yourself because it enables you to capture your raw thoughts when in the moment. Digestible in bite-size pieces for yourself and the world to see.

</comment><comment><USER25> What are you passionate about? Start there.

I'd rather see an article describing, in detail and with passion, your particular [esoteric computer configuration], than the most requested topic in this thread. If you don't want to write about X, then no matter how desired or profitable it would be to do so, it's probably not going to be a great article.

My advice would be to write what enthuses and interests you. And if nothing in that domain is something you feel should be written, then maybe consider finding a different outlet for your creative energy. Nobody's forcing you to start a tech blog :)

</comment><comment><USER26> For open source or generic computer science topics, I think it is indeed difficult to come up with much in the way of useful new or interesting content.

Do you use any proprietary or closed source products? Many (not all) of those have poor quality, perfunctory documentation, and if you work with them a long time you'll development knowledge by means of experimentation, reverse engineering and support tickets.

Try blogging some of that, or develop it into some alternative documentation, book, or presentation. Become a well-known independent expert.

</comment><comment><USER27> Just reply to HN threads. After a while, you'll have plenty of material you can remix into blog posts. You may also have some opinions that you need to express.

Also: if you want to be more original, pick more original topics. Write about newer products, current tech-relevant events (any event is tech-relevant if you can see the relevance). Go to meetups and write about them. Do something (it'll be unique enough just because you're doing it) then write about that experience.

</comment><comment><USER28> > I want to start writing a technical blog (related to computer science and > development)

Why?

> but almost every topic I think of has been written upon by someone, probably > better that what/how I would have written it.

So?

If you want to write the __most __authoritative blog post on some technical topic, why? Why be the best? Why that topic?

Write what you want to write about. In a year or two you can look back and revise/delete your old posts if you want. Do you think your favorite blogger's first post was amazing? Probably not.

</comment><comment><USER29> Read good books and observe closely. Also, read up some popular blogs. This will hopefully serve as a good input.

Further, read up popular questions on Stack Overflow within your area of competence and offer your perspective. This will do two things a)- give you confidence that you're writing something for which audience exists b)- improve your understanding of issues as well as you write.

Please take this with a grain of salt since I'm not a good writer myself nor have a popular blog :)

</comment><comment><USER30> Don't write because you want to write. Write because you care.

That is, when you're trying to pick a topic, don't look for a topic that hasn't been written about. Look for a topic that you want to write about. Write about that.

Yeah, try to say something different than what everybody else has said. Yeah, try to say it different than everybody else has said it. But mainly, if you don't care about the topic, don't bother writing about it.

</comment><comment><USER31> What are you interested in? What are you working on? What do you want other people to know? Write about that.

> but almost every topic I think of has been written upon by someone

That same logic applies to almost everything, including most creations, products, items, professions, jobs, and certainly most business ideas too. What is truly unique and original? Not much. Some of the best ideas are simply new takes on existing things.

</comment><comment><USER32> Hey, check out all videos on youtube about doing pushups!

How hard it can be to do a pushup? But everyone has his own style of video and maybe you don't like/understand 8 in 10 then 9th is not that good and 10th is something you like.

With CS stuff like programming, maybe your approach will be understandable for people more that what is already written. Maybe you will pick up some detail that others skipped.

</comment><comment><USER33> Write about [https://mokens.io](https://mokens.io). This is a new technical tool that enables regular people to design and create their own cryptocollectibles. I can give you any/all the data you need to write about this.

Cryptocollectibles is a new field that is growing and incubating and not much has been written about it.

<comment><USER34> _why_ exactly are cryptocollectibles relevant? They seem pretty pointless barring very few uses.

I'm genuinely curious, I would probably read something about it. They seem useless for the commonplace at surface value.

</comment></comment><comment><USER35> You've got to first start by finding something that you're interested in. As long as you're interested in something then you should be able to find a sub- area which hasn't been discussed quite as much as you'd like or discussed in a manner that you like.

Write for yourself to help learn a skill and improve your ability to write future articles.

</comment><comment><USER36> For lots of people (including me), writing is hard.

The people that wrote the better version of your article probably weren't great writers from the start. My advice would be to just start writing. You will get better and you will find along the way what you want to write about or maybe you will find you don't want to write at all.

</comment><comment><USER37> You could always pick something you don't know much about but are interested in, then blog about your learning process. Chances are you'll present it in a way that helps someone else learn it, who either appreciates your presentation style, or couldn't find answers to issues they faced on their learning path.

</comment><comment><USER38> The most important thing I ever got from blogging is that it helped me learn topics. One of the best ways to learn something is to teach it, and that is more or less what a technical blog is. You're trying to teach your readers something.

Find a topic you want to learn (or understand at a much deeper level) and blog about it.

</comment><comment><USER39> At the risk of hijacking the comments thread:

Any pointers on how to start blogging about a side-project? I've been working on a prototype, but it isn't quite operational yet. I'd like to start laying the groundwork, but I'm having trouble distilling my thoughts into actual blog posts.

<comment><USER40> write about the requirements of your side-project, why you started it? what would be the use of it etc. Blog about every feature that you develop and how to use it. This will help in documentation when your prototype is ready and you might be able to attract audience who are interested in your prototype and might help you with beta testing/refine the features. You can also get early feedback without finished product. For technical posts look at your commit log and pick the one that you think is most complex and describe it. It is possible that it may not be to the level of your satisfaction and you can refine it in second pass until you think it is ready to go. Idea is that is is easier to refine than writing from scratch. my 2 cents!

<comment><USER39> >write about the requirements of your side-project

>For technical posts look at your commit log and pick the one that you think is most complex and describe it

Thanks so much. This is exactly the kind of entrypoint I was looking for.

</comment></comment></comment><comment><USER41> When I'm trying to solve a technical problem and have to cobble together a solution from two or more piece of content found in Google, that's a signal that there's room in the marketplace for a single, SEO-optimized piece on solving that particular problem.

</comment><comment><USER42> A fascinating technical blog would be about exploring private apis of common applications people use.

</comment><comment><USER43> I believe you can blog about ICO [https://besticoinvest2018.com/wax/](https://besticoinvest2018.com/wax/) Just check this out.

</comment><comment><USER44> Just write articles that you would find interesting to read--don't worry about the subject. I like reading technical articles that have lots of illustrative figures and modest amounts of interactivity, so that's how I write.

</comment><comment><USER45> Just get started, that is the hardest part.

Once you've gotten into the habit of writing, you can move toward whatever interests you most.

</comment><comment><USER46> The easiest is to find a dataset and analyse it. Pull together information from different sources. Write a web crawler, etc.

</comment><comment><USER47> Why not yo dawg and put a blog about your blog in your blog so you can blog while you blog.</comment>


Ask HN: Are online lotteries/sweepstakes/pools legal and can they be successful? - <AUTHOR>

I had a random idea this afternoon for a quick weekend coding session involving online betting pools with a social twist, I'd like to know if these can or have been successful or are they best to be avoided. Additionally for a gambling website are you liable in your country of residence or in the country the website is hosted in? Would HN members ever play any betting games etc <comment><USER2> IAKAL, but my assumption is that each individual participant is liable to the country in which they reside. For example, as a US resident, there are specific laws regarding how I can and can't make deposits/play on online gambling websites.

On the other hand, you the company are liable in the country the business is registered in... I would think hosting means little, unless we're talking about jurisdiction to shut you down.

<comment><AUTHOR> I've been naïve in thinking that the hosting would have any effect on it, though you're right with regards to the jurisdiction to shut it down. I'll have to investigate it further. I could register the business in another country but that would involve cost that I don't think I'm willing to front for a weekend project and has a certain dodgy feeling attached as well. With regards to the states, I would have to investigate each states legislation as well, before I could allow entry to participants to my understanding.</comment></comment>


Elastic acquires application performance monitoring company Opbeat - <AUTHOR> https://twitter.com/elastic/status/877836449219006464 <comment><AUTHOR> I guess this is a better URL: [https://www.elastic.co/blog/welcome-opbeat-to- the-elastic-fa...](https://www.elastic.co/blog/welcome-opbeat-to-the-elastic- family)

It would be interesting to get the Opbeat's founders perspective on why they'd sell and close a product they've been working on since 2012. Just to soon do it again, but this time for someone else's company.</comment>


Hiring Your First Employee - <AUTHOR> http://blog.makeleaps.com/2010/07/hiring-your-first-employee-for-your-service-business/

<comment><USER2> At what point does one go from the feeling that they have to do everything themselves to make sure it's right to actually taking the leap of faith to hiring someone. I feel like I am constantly bottle necking growth, but it gets scary. What experiences have you guys had with this? What does it feel like to hire your first employee?

<comment><USER3> "What does it feel like to hire your first employee?"

It's terrifying. Not just because you're changing something you're used to and giving up control, but because you are becoming somewhat responsible for someone's livelihood - they are literally banking on you to help them live, eat, support family, etc. If you run out of work, what's going to pay their rent?

I started a web dev studio in '98 with a friend. After 6-7 years, he moved to London, wanting to work there, and I was a sole trader, using a few freelancers.

Today, I have a full-timer, a 0.7ish (who cranks out stuff fast enough to be considered a full-timer) and take on paid trainees from time to time. I pay myself much less than I did when I was a sole trader but it doesn't really bother me - I get a lot out of providing fun opportunities for two young employees.

But before my first hire, I ummed and aahed for a long, long time. I made half-hearted efforts to find someone and usually bailed before committing. In the end, I gave a young, less-than-qualified but fast-learning, good-hearted kid a trial and he did well. I can't even remember reading his resumé but we met at a café to talk things over, got on fine and I can remember that he could spell "definitely" in his emails. Sounds trivial, but the HN post the other week about "when in doubt, always hire the better writer" really resonated with me - when you're letting someone loose contacting the clients you've nurtured for 5-10 years, you don't want them embarrassing you. You need to trust them and it's easier if they show care and can spell.

I've never regretted that hiring, nor my second one either. They have jobs for as long as I can keep the money coming in to pay them. Either my character- barometer is sound or I got really lucky.

Terrifying to begin with, but rewarding later.

The only problem now is that I'm still the bottleneck. At 3-5 people, we're big enough to need a production manager, but too small to be able to afford one. All the worst parts of small business magnify too - even with an accountant and bookkeeper, there are more boring and annoying parts to deal with than ever, and I have sacrificed salary to bring employees on board. But it's tough to jump from sole trader to a ten-person team, so perhaps this is just a rough intermediary step.

A few keys:

      - start them on a trial
      - pick someone who fits your working culture (we are all very social in this shared office) and is a good personality fit
      - pick the person that can spell "definitely"
      - you might need to make sacrifices to take that next step
      - don't worry about running out of work to keep them busy, just roll the dice. As my friend is wont to say: No balls, no babies.

<comment><USER2> "no balls no babies" haha, love that. Thanks for the great advice prawn. Yea, definitely a leap of faith.

<comment><USER3> Hey, you can spell "definitely" --> hired! :P

</comment></comment></comment></comment><comment><USER4> A point I would make about 'Vision Over Job Description':

I think it's vital to also be open about the need for a generalist. If all you do is give someone a title (plus vision), there's going to be enough of a role associated with that title to create a set of expectations. It's easy to put someone in a position early on where they think, 'an x doesn't do y, what's going on?'

Even for a low-level employee, I would consider doing salary plus equity if they're the first on board. I've seen it work before.

Another point I think is critical is if you expect someone to come on board and wear all hats, you'd better make sure you're willing to do it as well. If you're working all hours to make your business grow it will be easier for your employees to swallow.

If they think they're working more than you they'll leave and that's hard to recover from, at least in the sort term. Losing a team member hurts everyone's morale, especially your own.

</comment><comment><USER5> We found our intern with the intention to hire if we found a good fit. (And he found us by my comments here on HN!) I described somebody who was interested in wearing many hats from admin to programmer, with at least some programming/Ruby experience, and voila!

We lucked out on the first try and we will be employing him as soon as we can get the paperwork together.

I highly recommend this type of approach for junior devs, do-it-all peeps, and even admins.

Also, from my hiring days in corporations, my more general recommendations:

* hire on attitude, passion and team fit, not current skill set (unless you are totally crunched)

* ask them what they read on their own time

* figure out why they do what they do (or do what the job description says)

A smart, motivated, passionate, conscientious person with not-quite-enough experience will quickly bring herself/himself up to speed. On the other hand, a person with the exact skillset you need may be unbearable.

As for the money, well, we're a 2-person company. We have not just our SaaS product, but live training courses, etc. Yes, it's kind of scary to employ somebody, but we figured out that, worst case, we can just do one training course a month to cover the monthly salary of our new addiction. That's a good trade.

<comment><USER6> > hire on attitude, passion and team fit, not current skill set (unless you > are totally crunched)

I wish everyone in a position to hire thought like this. The overall quality of developers in the industry would improve sharply, for one. Programmers as a whole might be a less bitter lot, as well.

Kudos to you sir.

<comment><USER7> yeah, but attitude alone doesn't build products. If we are talking for just some simple web app, then that is fine, but if you are doing anything that is technically challenging, you better have somebody experienced on the first 2-3 employees you hire.

You need both energy/passion, but also somebody that is good and has experienced a lot, both successes and failures.

One thing I noticed really good engineers with experience tend to be a bit more pessimistic/opinionated by nature, and also more pragmatic. They can anticipate problems down the road (where a junior engineer would think everything is jolly), while avoid over-engineering. Junior programmers are more likely to either over or under engineer; brush potential problems as "insignificant", or grossly underestimate what it takes to get something done.

Most of us have been there at some point. But also a junior engineer might bring your fresh energy to the mix.

But remember, really good engineers, with experience,and with passion and great attitudes, are hard to find. Mainly b/c they have no problem to find a job.</comment></comment></comment>


A VC: Posting From The "Sad-assed Backwater"  - <AUTHOR> http://avc.blogs.com/a_vc/2007/10/posting-from-th.html <comment><USER2> Someone should put together an anthology of Fred's posts defending NYC.

<comment><USER3> I wonder if it would sell better or worse than an anthology of your posts defending Cambridge. :-)

In all seriousness, I don't know enough to judge the accuracy of either your opinions concerning Cambridge or Fred's opinions concerning NYC; but I can't help wondering if there's a certain amount of "home town"ism going on in both cases.

<comment><USER4> Well, the Red Sox did win the world series.</comment></comment></comment>


Macros across boundaries - <AUTHOR> http://frenchy64.github.io/2018/04/07/gradual-macro.html <comment><USER2> Nice comparison between adding type annotations in Clojure vs. Racket.

Not for everyone's tastes but I like optional typing in Racket, Clojure, and Python. I prefer bottom-up development heavily using a repl but once I get ideas working, then adding type annotations provides safety, eases future refactoring efforts, and takes little effort.

I also very much like Haskell, but I probably have a weak coding style in Haskell because I also tend to do repl based coding and just think of getting things working, then in the repl use ":type" to get a new functions type signature and past that into an edit buffer along with the corresponding function. I think that Haskell experts think more of types up-front.</comment>


K8s-testsuite, the only existing k8s network performance/load test existing? - <AUTHOR> https://github.com/mrahbar/k8s-testsuite <comment><AUTHOR> I've found nothing else that is able to execute a network performance testing / monitoring on kubernetes cluster , and also this project seems no longer mantained, what do you use ?

<comment><USER2> For conformance, I highly recommend using Sonobuoy, which is the basis of the Certified Kubernetes program: [https://github.com/cncf/k8s-conformance](https://github.com/cncf/k8s-conformance)

For performance testing, please see: [https://github.com/kubernetes/perf- tests](https://github.com/kubernetes/perf-tests)</comment></comment>


[video][iPad] deck. A replacement for iOS 5's horrible Music app. - <AUTHOR> http://www.szello.com/deck/

<comment><USER2> This app looks really nice, but what was so bad about the native music app? Third party apps that try to replace a native iOS app are usually unable to replace all of the built-in functionality. For example, will this app show the album art on the lock screen?

<comment><AUTHOR> Good question, Joe. Not all apps that replace native iOS apps are the same nor use the same techniques.

Since our app uses the built-in iPod Music controller, we activate all the same features that the Music app does. So, your example of showing the album art on the lock screen does in fact work.

This is different than different category apps, like Safari replacements, that can't take advantage of all the built-in controls/features outside of the app.

(I work for szello)

<comment><USER2> Oh, that's cool. I didn't know that was possible.

</comment></comment></comment><comment><USER3> One complaint: When browsing artists, why don't you move though the Artist -> Albums -> Songs hierarchy? If I have an artist with 10 albums, selecting that artist just gives me an alphabetical list of all their songs across all 10 albums. This is lame when you want to start an album from the top and listen through.

(Yes, I'm aware that you can navigate by album name, but who remembers all your album's names?)

</comment><comment><USER4> Big buttons are better, but this still replicates an incredibly annoying UI paradigm that kills me: << > >> or Back, Play [Pause], Forward

Whether it's an audiobook or music, I'm hitting the play and pause buttons all the time. I don't have particularly thick fingers, but my genius self still manages to accidentally hit the Back or Forward button's instead of Play or Pause about 2 times out of 10. In an audiobook, loosing your place and finding it again is a killer, especially if the book is split into very long segments of audio.

Minor nitpick on a device with such large buttons, but I just find that idea annoying. Could be just me and my obviously adroit digits though :p

<comment><USER5> I think the world needs an app especially for listening to audiobooks, because that's a special case needing different UI from listening to music. A purpose built app for listening to audiobooks needs a rewind 30 seconds button, like Audible has. It would also need special UI features for moving forward and back through the audio-- the normal slider method works really terribly when listening to a 4 hour long piece of audio where 1 pixel is like 7 minutes.

<comment><AUTHOR> Very true. We tried to accomodate for audiobooks and podcasts by adding 30 second back button and a larger slider that's easier to scrub. It isn't perfect, but is much better than the Music app.

You're right though, an app especially for audiobooks with bookmarks, notes, etc. would be great.

Thanks for the feedback!

</comment></comment></comment><comment><USER6> The screenshots on this page are next to useless for evaluating the app. I appreciate there is a video but it seems they're missing a trick.

The app's App Store page on the the other hand is much more pleasant.

</comment><comment><USER7> Maybe mention that it plays songs from the standard music library.

<comment><USER3> Ya, that's important to understand. This is really just another UI for your existing music (works great with my iTunes match library for instance). You can even switch between both the built-in app and deck to control if you want.

</comment></comment><comment><USER8> This was built for me. That Music app is _so_ bad! Thank you.</comment>


Diluting Blood Plasma Rejuvenates Tissue - <AUTHOR> https://medicalxpress.com/news/2020-06-diluting-blood-plasma-rejuvenates-tissue.html <comment><USER2> In the same vein, I wonder if people that get bone marrow transplants experience a boost in health in addition to the reversal of the original illness.

Can it even be measured?</comment>


Famo.us – JavaScript engine and framework (Livestream today) - <AUTHOR> http://famo.us/ <comment><USER2> Some more information: [https://docs.google.com/a/famo.us/document/d/1aC461kM855a66S...](https://docs.google.com/a/famo.us/document/d/1aC461kM855a66SzFT_TG8sHpQxqDWy-4yH2XfLBxtTk/edit?pli=1)

and [https://docs.google.com/a/famo.us/document/d/1DE_26fh9nYbU2x...](https://docs.google.com/a/famo.us/document/d/1DE_26fh9nYbU2xYcrxPWFLjC5Lc1M-0vf2L-qTmuoqw/edit?pli=1#heading=h.6ncv3vx0scj6)

Source: [https://twitter.com/befamous](https://twitter.com/befamous)

</comment><comment><USER3> "40-60fps on phones, tablets, PCs..." >klicks a button >site doesn't react for 2 minutes >laggy background animation >on i7 2.7GHz Laptop (AC adapter plugged in)

Either I'm missing something, or this is absolutely ridiculous. The performance problem is because of the abstraction level, we're too far away from the metal with DOM/JavaScript. This can't be solved with JavaScript.

<comment><USER4> I'm assuming it compiles to native code on mobile.

BTW, I have a shit computer and the site ran smoothly for me.

<comment><USER3> It displays a completely different site on chrome than on firefox for some reason...

<comment><USER5> Maybe Firefox cant handle it?

</comment></comment></comment></comment><comment><USER6> Would be nice if "About" page worked - just to clear some stuff about framework.

Also, something's not quite right with menu background on Android (Chrome) disappears after a bit. Although, if you click on "menu" button, it's visible, but only until you close it.

</comment><comment><USER7> I really hope this is successful. But to me, animation performance is really a small problem in the larger problem of deploying HTML as an app. Sure, having something that performs on par with native apps is great. But, both Ionic and WinJS seem to be tackling that problem right now. And, both don't use some esoteric 3D rendering engine and are fully compliant with Angular or anything else you want to use.

The bigger problem, in my mind at least, is gaining full access to the same APIs that are available to native DEVs. Cordova does a pretty good job, but if you go off their core APIs then you are stuck trying to build or figure out plugins, which is less than ideal.

</comment><comment><AUTHOR> Livestream: [https://www.youtube.com/watch?v=YmQMVjCVZBo](https://www.youtube.com/watch?v=YmQMVjCVZBo)

</comment><comment><USER8> List of demos: [http://demo.famo.us/](http://demo.famo.us/)

</comment><comment><USER9> I like how the example idea is ripped off three.js: [http://threejs.org/examples/#css3d_periodictable](http://threejs.org/examples/#css3d_periodictable) ;p

But seriously, this doesn't look very release-ready.

<comment><USER10> If you visit your own link and then click on the "info" link at the top, you'll be taken to a G+ post explaining that the three.js periodic table demo was an attempt to recreate something the author had seen.

Written in famo.us.

<comment><USER9> You're right, that's interesting.

<comment><USER10> If nothing else it's an indictment of the weird beta-but-not-really-beta that famo.us has spent so much time in, given that this isn't the first time I've seen people assume that it was a three.js demo that inspired the famo.us demo, rather than the other way around.

<comment><USER9> Yeah, it seems the first post about it on HN was over a year ago. I suppose that's a good enough time for a controlled test release. Will be exciting to see this in the wild.</comment></comment></comment></comment></comment>


Reexamining what makes health care so expensive. - <AUTHOR> http://reason.com/archives/2009/10/20/health-care-nihilism

<comment><USER2> "The rise of HMOs was enabled by an earlier federal government attempt to rein in health care costs, the Health Maintenance Organization Act of 1973. The idea behind HMOs was that these insurers would control costs by offering a wide array of preventive care to their subscribers. That sounds like a plausible idea until one realizes that people, on average, change insurers every four years or so. An insurer that invested in preventive care was unlikely to reap the cost-saving benefits."

That's an interesting response to the HMO phenomenon, which I remember was touted as a solution to ballooning health care costs. The cost containment didn't happen, which is an important lesson for today's predictions about efforts to contain health care costs.

<comment><USER3> I also read this as one of the most important points in the article.

I wonder if requiring insurance companies to accept all customers, regardless of risk or pre-existing conditions, would create incentives for insurers to promote more preventative care.

Since customers could still switch providers, insurers wouldn't _know_ whether or not they'd be holding the short straw when the customer gets sick in 10 years, but that wouldn't matter since they'd have the same chance as any other insurer of 'reap[ing] the cost-saving benefits' of their own preventative care.

<comment><USER4> Unless the insurance company holds 50% market share, the odds are pretty high that they won't reap the purported benefits of preventative care.

If a companies market share is 10%, their odds of reaping the benefits of P(customer switches) x 10%.

Regardless, I'm not sure how an insurance company will manage to get people to eat less and exercise more.

</comment></comment></comment><comment><USER4> One unavoidable reason why health care costs go up is simply Baumol's Cost Disease.

<http://en.wikipedia.org/wiki/Baumol%27s_cost_disease>

In short, health care hasn't experienced the same productivity gains as manufacturing, agriculture or many other areas. The cost of medical services is proportional to income, while the cost of cars, computers and groceries have gone down relative to income. Therefore, the opportunity cost of visiting the doctor has gone up.

There is little we can do to fix this without mass producing medicine.

<comment><USER5> You seem to be right, that would be what is happening.

So, how do we mass produce medicine?

<comment><USER6> Easiest solution is to embark on a serious 10-year plan to double-and-then- triple the number of newly-created mds passing through the system.

This can't be done immediately -- it'd take time for institutions to ramp up their teaching staff and associated facilities -- but it could be done over time.

Some federal program that'd make funds available on condition of a particular school hitting a particular # of enrollments would the simplest solution; given a choice between mad money and placating the AMA boffins most administrators would take the money.

There's no real shortage of people capable of being decent physicians; most of the selectivity of medical school admissions is b/c the # of slots the schools allow is low.

<comment><USER7> Physician supply is a long, long way down the list of fundamental issues with US healthcare.

Right now, we as a nation have bigger fish to fry - such as making the moral decision on whether we as a society feel healthcare should be a right or a privilege, and getting the right alignment between economic incentives and effective healthcare.

<comment><USER4> No, physician supply is a fundamental issue. The price of medicine is high in part because of scarcity: there are (doctor's working hours) x (number of doctors) doctor hours available for consumption.

People desire more doctor-hours than exist, hence some rationing mechanism is needed. By increasing the number of doctor-hours (either increase number of doctors or doctor working hours) you can reduce the scarcity.

You can't eliminate scarcity simply by making a moral choice.

<comment><USER8> Sure you can reduce the price of physician time by increasing the supply, but that isn't practical for several reasons.

1\. The high price is largely due to the need to pay off education loans. Physicians commonly finish training $200K+ in debt. Even if there were more physicians, they would have to charge almost as much just to make ends meet. To solve that you first need to find a way to cut the price of education.

2\. Very few people want to be physicians, and fewer still have the intelligence and talent to do it well. Treatment by a quack is often worse than no treatment at all.

3\. The only way to get a lot more physicians in to industrialized countries is through immigration from developing countries. However the political climate has turned against immigration (I think that's a bad change, but it's unlikely to reverse any time soon). And importing physicians leaves those developing countries bereft of medical care they desperately need.

4\. Most physicians already work long hours. You can't squeeze much more out of them. Or if they do work longer, quality of care suffers.

<comment><USER4> The question of whether training more doctors is feasible is tangential to the point that making a moral choice won't make medical services less scarce. It may not be feasible, and in that case there is no solution to the problem of scarcity of medical services.

Regarding increasing the number of doctors: plenty of people want to be physicians. In 2007, 42,315 people applied to medical school, but only 17,759 were accepted.

<http://www.aamc.org/data/facts/2007/mcatgparaceeth07.htm>

The people who are rejected are fairly close in scores (GPA, MCAT) to those who were accepted and there is plenty of overlap between the accepted/rejected distributions.

Let me do a little normal-distribution-fu. Assume that MCAT VR of 8.3 is the cutoff for "intelligence and talent to do it well". If we accepted every white person above that cutoff, we could train about 10,728 more white doctors per year and a few thousand more asian doctors.

(I picked 8.3 so I can call you a racist if you say you want a higher cutoff. ;) )

Regarding point 4), I agree.

In any case, while increasing the supply of physicians may not be feasible, this doesn't mean it is the case that making a moral choice can cure issues of scarcity.

<comment><USER6> Thank you for making my case more succinctly.

I'm intimately familiar with the specifics of medical education as a family member of mine is a high-up muckety-muck at one of the world's better academic hospitals (won't be more precise than that).

There's a perception amongst outsiders that medicine is unbelievably difficult that only a handful of people qualify for medical training on their merits; a more accurate assessment is that the # of slots is fixed and the admissions are as selective as they need to be to filter down the applicant pool to the # of available slots.

It'd take time to ramp up to being able to handle that many students -- medicine is mainly taught by working under the supervision of existing experts, and there's a finite supply of expert-hours at the moment -- but the present rate of doctor-production is far from what it could be without a material drop in applicant quality.</comment></comment></comment></comment></comment></comment></comment></comment>


Same-sex attraction isn't an evolutionary paradox – here's why - sahin-boydas https://www.newscientist.com/article/mg24532684-400-same-sex-attraction-isnt-an-evolutionary-paradox-heres-why/ <comment><AUTHOR> The abstract from the author's paper on the subject:

> Human same-sex sexual attraction (SSSA) has long been considered to be an > evolutionary puzzle. The trait is clearly biological: it is widespread and > has a strong additive genetic basis, but how SSSA has evolved remains a > subject of debate. Of itself, homosexual sexual behavior will not yield > offspring, and consequently individuals expressing strong SSSA that are > mostly or exclusively homosexual are presumed to have lower fitness and > reproductive success. How then did the trait evolve, and how is it > maintained in populations? Here we develop a novel argument for the > evolution of SSSA that focuses on the likely adaptive social consequences of > SSSA. We argue that same sex sexual attraction evolved as just one of a > suite of traits responding to strong selection for ease of social > integration or prosocial behavior. A strong driver of recent human > behavioral evolution has been selection for reduced reactive aggression, > increased social affiliation, social communication, and ease of social > integration. In many prosocial mammals sex has adopted new social functions > in contexts of social bonding, social reinforcement, appeasement, and play. > We argue that for humans the social functions and benefits of sex apply to > same-sex sexual behavior as well as heterosexual behavior. As a consequence > we propose a degree of SSSA, was selected for in recent human evolution for > its non-conceptive social benefits. We discuss how this hypothesis provides > a better explanation for human sexual attractions and behavior than theories > that invoke sexual inversion or single-locus genetic models.

[https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6976918/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6976918/)

</comment><comment><USER2> Not sure it's the same angle, as I can't open the paywall. But the book Sperm Wars, published 1996, covers the topic quite well. It puts forwards a mechanism where a spectrum of sexuality is genertically inhereited via selection.

See [https://en.wikipedia.org/wiki/Sperm_Wars](https://en.wikipedia.org/wiki/Sperm_Wars)

</comment><comment><USER3> Is there a workaround for this paywall?

<comment><USER4> You don't really want one, honestly. _New Scientist_ is the _Daily Mail_ of science publications. For anything they might publish, if you can find another source, then that other source is likely to be more accurate and less sensationalized and anything you might have learned in the NS article would be more profitably learned at the other source; and if you can't find another source, it's almost certainly not true.

</comment></comment><comment><USER5> Trying too hard. It suffices to _observe_ same-sex attraction across the animal kingdom, and to conclude that same-sex attraction isn't unnatural. The author is here tackling and failing to clear a much higher bar.

Edit: To make things clearer for downvoters: Suppose I see two male ducks having sex, and I ask, "Why are two male ducks having sex?" I am suggesting that it is sufficient to answer "I don't know, but it definitely happened," and not "Because of specific benefits to duck society, such as..."</comment>


I only know PHP. How do I write a Web application in Python? - <AUTHOR> http://me.veekun.com/blog/2012/05/05/python-faq-webdev/ <comment><USER3> I'd say the necessity of this post is _why_ PHP is as popular as it is. With PHP, there are no package managers I have to install; there is no template language to learn; there is often no version control; there is no "framework"; etc. You just drop in a .php file and, most likely, it will just run. If I need a quick dynamic page on my server, it's much easier to do this in PHP than in Python or Ruby.

Until Python or Ruby have that kind of simplicity, they can't overtake PHP. While it might not be the kind of design that leads to well-designed web apps or even good code, it is the kind of design that leads to more — especially less technical, or, like me, lazy — users. It's up to the developers of those languages if this is even a market they want. There may need to be something new to do the same job as PHP, but better, without the innumerable warts.

<comment><USER4> CGI scripts have much of PHPs simplicity. You can just drop in a executable file, and depending bit on server configuration, it will just run. With Python a basic hello world would look something like this:

        #!/usr/bin/python

        print "Content-type: text/plain"
        print ""
        print "Hello World!"

So 3 lines of "boilerplate", and then you can do anything you want. No extra packages to install or languages to learn. No frameworks necessary.

edit: just as an example of minimal hello world in WSGI:

        def application(environ, start_response):
            start_response('200 OK', [('Content-type', 'text/plain')])
            yield 'Hello World!'

also doesn't need any extra python packages or frameworks. but configuring web server to handle wsgi is bit more involved than cgi.

<comment><USER5> Let's look at the PHP version:

        Hello World!

One line. I didn't have to worry about Linux/Windows, knowing HTTP headers or the fact that I need two CRLFs after the last header[1]. I just wanted a page that says "Hello World!" and that's what I got.

Don't get me wrong, I would never choose to write a web app in PHP over python. But it is brain dead simple to go from nothing to something in a few keystrokes. Which is precisely what people just learning to write web apps want (right or wrong).

[1] I can't remember how long it took me to figure out that I needed the second CRLF after the "Content-Type: text/html" when I was learning perl (or even the fact that I needed to specify the Content-Type in the first place).

<comment><USER4> In the context of the parent comment I'd argue that the differences are insignificant. Xuzz argued that PHP is simpler because you don't need to know the ecosystem. Which I countered by showing a basic example of Python which doesn't depend on the ecosystem (like frameworks, package managers or version control).

Besides that, I don't think knowing HTTP headers or understanding significance of trailing newlines is required to write CGI scripts. You only need to know that you need those three 'magic' lines in the front of your scripts. Similarly like you need to know that in php you need <?php ... ?> around your script.

<comment><USER5> But I never needed to worry about those three lines in PHP, to a new user that is important. To you and I they come naturally.

PHP "is especially suited for Web development and can be embedded into HTML" [1]. Python "lets you work more quickly and integrate your systems more effectively" [2]. They can both do the task of the other, but the upstart time for a developer to handle the task of making a web app is smaller for PHP.

I've never taken the non-framework approach with python for anything significant, but how does it handle cookies, GET and POST fields, sessions, and file uploads? In PHP you'd have $_COOKIE, $_GET, $_POST, $_SESSION, and $_FILES as built-in global variables.

Are these differences still insignificant?

[1] <http://php.net/> [2] <http://python.org/>

<comment><USER6> Python has a `cgi` module that does most of the superglobal stuff for you.

But, er. Does this really matter? Yes, you can get "hello world" in PHP with one line of not-PHP. You can also get "hello world" in Python + Flask with seven lines, _and_ you'll get half a dozen extremely nice features for free that you can learn about as you go.

Arguing about what stack has the simplest way to build from total scratch is a sad race to the bottom. I'd rather be making the point that _rich_ Web development can be easy, not that cobble-your-own-thing-together-with-duct- tape can be easy.

<comment><USER5> The first poster in this thread made the statement: "If I need a quick dynamic page on my server, it's much easier to do this in PHP than in Python or Ruby."

So yes, it really does matter in the context of this thread. On the whole I agree with your philosophy that frameworks are there for a reason: you get many features for almost nothing.

But sometimes you just don't need a framework, you need something quick-and- dirty that just works.

<comment><USER6> But even something quick and dirty is longer than "hello world". I've written a couple pretty dinky things with Flask, and the minuscule overhead of typing `import Flask` was definitely worth having e.g. a solid template language and XSS protection ready to go.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> Nice littel overview, but...

"Unicode sucks. This is a universal truth."

And here I stopped reading. Unicode is the best thing around, what sucks it that Py2 does not implement it very well. Py3 does, and that is the main reason I really would like to use it and hope Django will soon fully support it. (Because: there are other languages beside the European ones)

<comment><USER6> Fair point. Correction: working with encodings sucks.

Py3 isn't _magnitudes_ better with Unicode; it's better about converting incoming bytes, and it makes literals into real strings. But the former isn't necessarily a good thing, and you can get the latter with a `__future__` import. Always dying on implicit conversions is definitely nice, though.

<comment><USER8> Working with encoding is not that bad in for example Ruby 1.9. What makes them horrible to work with are the bad design decisions in Python, especially Python 2.

<comment><USER6> I've only read about Ruby strings, not used them, but they seem like a middle ground between Perl's approach and Python's approach. What do you perceive as the problem with Python?

</comment></comment></comment></comment><comment><USER9> I would love to switch to Python from PHP but I can't. The reason is I keep getting told to learn Python 2. Python 3 has been out for ages!

Basically I am concerned that I will learn something and create app's which within a year will be out of date. I am confused why Python developers are advocating that newbies learn an old and presumably soon to be legacy version of the language.

I remember when this kinda happened with PHP and versions 4 and 5. I still run across hosts who default to PHP4!? WTF? Its 2012!

Is PYthon3 really that new that you shouldn't pick it up or is this developers still refusing to update?

<comment><USER6> Python 2 versus 3 isn't anything like PHP 4 versus 5.

The problem is that there are a few minor but backwards-incompatible changes to the _syntax_ in py3. Libraries can't update until all their dependencies update. And web frameworks are some of the most complex software with the most dependencies, so they're updating last.

It's still pretty much the same language behaving in the same way, though. If you know Python 2 really well, it'll take all of five minutes to get accustomed to Python 3. Just don't worry about it and learn 2 until people stop telling you otherwise. :)

<comment><USER10> "Don't worry, migration from Python 2 to 3 is really easy. It'll take 5 minutes to learn."

"Migration for libraries from Python 2 to 3 is really hard. It's taken them a few years and counting."

??

<comment><USER6> Right. _Learning_ Python 3, once you know 2, is really easy.

Library maintainers have two problems: they have to twiddle their thumbs until all their dependencies have ported, and then they have to get their code running against both 2 and 3. The former is exactly why I'm saying to use 2 for now, and the latter is easy if you only support 2.7 but rather more difficult for projects that still want to run on some archaic thing like 2.3.

</comment></comment></comment></comment><comment><USER11>
       The idea is that a transaction starts when a request  starts, and it's automatically rolled back if there's an exception. This is behavior you want from the start! It's half (err, ¼) the point of using a database.

I mostly agreed with the rest of the article but this strikes me as massive blooper. I can see no reason this would be considered good advise.

It's the database equivalent of the GIL, can't figure out what you actually need to lock? Just lock everything!

An example of this going wrong in production, I work in the online gaming (gambling) industry. One of our users won a large jackpot, our code started a transaction, contacted the 3rd party to have them release the funds, recorded the win in the transaction journal, updated the customers balance etc. Then the stored procedure which inserted a row into the outgoing email queue had a small error. This caused all of the database work on our end to rollback.

For what its worth, this was discovered during a reconciliation with the 3rd party and the customer received his winnings.

My point being, this is a horrible way of dealing with database transactions. Only things which are transactional by nature should be carried out within the same transaction. Obviously your code needs to deal with any errors and carry on or report an error as is appropriate.

<comment><USER12> > An example of this going wrong in production, I work in the online gaming > (gambling) industry. One of our users won a large jackpot, our code started > a transaction, contacted the 3rd party to have them release the funds, > recorded the win in the transaction journal, updated the customers balance > etc. Then the stored procedure which inserted a row into the outgoing email > queue had a small error. This caused all of the database work on our end to > rollback.

Updating a customer's winnings and recording a win are _definitely_ things that should be together in a transaction - if one happened and not the other, that's a failure.

This is not the fault of using a transaction, this is the fault of not working with what is essentially a _distributed_ transaction. Since you are relying on a message against a third party, you need to build distribution into this system, which is challenging. You might contact the third party _after_ you've completed the internal processing, and you might use two-phase semantics even such that you can "PREPARE TRANSACTION" the work you've done locally, (nearly) guaranteeing that a commit will proceed, then work with your external messaging, then commit locally.

background at <http://en.wikipedia.org/wiki/Two-phase_commit_protocol>

<comment><USER11> > Updating a customer's winnings and recording a win are definitely things > that should be together in a transaction - if one happened and not the > other, that's a failure.

Yes, they these clearly do belong in the same transaction. Inserting a congratulations email into the email queue doesn't.

<comment><USER12> emails typically get fired off as part of a post-commit hook. Pyramid's transaction manager has explicit support for this pattern - as you establish "emails" within your trans, the actual send operation is deferred til after the transaction proceeds.

</comment></comment></comment></comment><comment><USER13> "MySQL is the PHP of databases". Strange, I just had this sentence popping in my head yesterday. I'm seriously considering writing a list of its wrong doings.

Great article overall.

<comment><USER14> Color me as another interested specimen.

<comment><USER13> I wanted to do that now but did some lego with my kid instead, will keep you 3 informed when done.

<comment><USER13> It seems an article on Ars Technica has already compiled some defect of MySQL:

[http://arstechnica.com/civis/viewtopic.php?f=20&t=92525](http://arstechnica.com/civis/viewtopic.php?f=20&t=92525)

Another thing that reminds of PHP, the list of commands:

        mysql                       mysql_client_test_embedded  mysql_find_rows             mysqlrepair                 mysql_tzinfo_to_sql
        mysqlaccess                 mysql_config                mysql_fix_extensions        mysqlreport                 mysql_upgrade
        mysqladmin                  mysql_convert_table_format  mysql_fix_privilege_tables  mysql_secure_installation   mysql_waitpid
        mysqlanalyze                mysqld                      mysqlhotcopy                mysql_setpermission         mysql_zap
        mysqlbinlog                 mysqld_multi                mysqlimport                 mysqlshow
        mysqlbug                    mysqld_safe                 mysql_install_db            mysqlslap
        mysqlcheck                  mysqldump                   mysqlmanager                mysqltest
        mysql_client_test           mysqldumpslow               mysqloptimize               mysqltest_embedded

Why the hell show we want a 'mysqldumpslow'? Is it because mysqldump is fast but wrong? And why not mysql_dump?

I have started with MySQL for my first (php) website, and to me the database was just the natural storage, I had no idea of the problems, because I didn't know that a relational database is a particular well-defined mathematical object, which asserts truths about the "world" in a manner that makes it possible to model this world safely and ask questions about it. Then I used PostgreSQL at my previous work, and discovered it all, the hard way. And PostgreSQL has (almost) always been a reliable companion taking care of the most valuable asset: the Data. Then I switched job and have to use MySQL again. I live with it, it's fine, but the difference is not benign, and I sometime wonder if the NoSQL movement is not a partly a misunderstanding and should renamed NoMySQL: when using an unreliable datastore, it is certainly better to use one that is explicitly not reliable and do not force on you the relational model while, at the same time, not giving you its strengths.

<comment><USER15> In case anybody was wondering: mysqldumpslow is for dumping MySQL's slow query log.

</comment></comment></comment></comment></comment><comment><USER16> Is there any cheap & easy webhosting available for Python?

Occasionally I get commisioned to build small websites ( < 50 visitors per day) and for that I want to be able to build the site in a day or two.

I don't want the hassle/expense of having to setup and run VPS/AWS infastructure. I just want to give someone a bunch of files and say "sign up for some cheap webhosting, ask them to give you a DB called X and upload these".

I usually end up just doing it in PHP, but it has always felt like a poor reason to choose a language with so many warts.

<comment><USER17> Heroku is a good choice,

> This quickstart will get you going with Python and the Flask web framework > on the Cedar stack. For Django apps, please see the Django quickstart.

<https://devcenter.heroku.com/articles/python>

It can be very cheap or free at low scale,

> Each application receives 750 free dyno hours per month.

<https://devcenter.heroku.com/articles/dynos>

<comment><USER18> Replying to Jiggy, but can't directly reply since it's dead:

No, a simple Rails app is not very coupled to Heroku.

The deployment process is simpler and pretty unique to Heroku, but it's usually pretty easy to move away from Heroku or deploy in parallel to another location. I actually deploy one app to Heroku and I have an offsite backup process that deploys the same codebase to a NGINX/Passenger setup and clones the production Heroku data to that instance.

Your mileage will vary, of course. If you start using a bunch of Heroku plugins, you'll find it's harder to maintain an easy dual-deploy setup.

</comment></comment></comment><comment><USER19> I have no idea why web2py gotten such a bad rep. I am a beginning webdeveloper and seriously: web2py is a pleasure to work with. Simple to start, deploy, port and hack. It's backwards compatible and has a template language that really is non existant as so far as its pure python.

Compare that to Rails - which is (comparable) hell to set-up and breaks with upgrades etc.

If you want python web development to be simple, web2py is the way to go. Since I don't have a CS degree and I have often been wrong before - <USER2> might be a real problem somewhere. But I don't think so. One of the reasons for this is that Jakob Moss removed his web2py bashing from this thread. Didn't edit - removed it: [https://www.quora.com/Is-web2py-a-good-Python-web- framework/...](https://www.quora.com/Is-web2py-a-good-Python-web- framework/answer/Anthony-Bastardi)

<comment><USER20> > But I don't think so. One of the reasons for this is that Jakob Moss removed > his web2py bashing from this thread. Didn't edit - removed it: > [https://www.quora.com/Is-web2py-a-good-Python-web- > framework/...](https://www.quora.com/Is-web2py-a-good-Python-web- > framework/..).

What did he remove?

[https://www.quora.com/Is-web2py-a-good-Python-web- framework/...](https://www.quora.com/Is-web2py-a-good-Python-web- framework/answer/Jacob-Kaplan-Moss-1)

This isn't the first instance of Django/Flask people not agreeing with web2py design and implementation, and they have been vocal about it a couple of times.

[http://www.reddit.com/r/Python/comments/ex54j/seeking_clarif...](http://www.reddit.com/r/Python/comments/ex54j/seeking_clarification_on_pylonsturbogearspyramid/)

Look for comments by mitsuhiko(flask dev) and jacobian(django dev).

<comment><USER19> Sorry - I remembered that I on an earlier occasion couldn't find JKM' answer. It's there now - and I personally don't find it convincing. Again - I am a novice and has no authority here. – I'd edit above if I could. I am sorry that I wrote wrong info.

Thanks for the reddit link. As you say it seems to me most of the flak is from not agreeing on something. But can an oppinion be correct?

And yes: Mitsuhiko seems to be a super cool, clever and friendly guy. In my last project I played around with request. Lovely it was.

Anyways: my point was not to express that web2py is the greatest thing invented since bacon. Only that I don't understand why the python community dislike it so. After all - web2py makes it very easy to build stuff. Hence it will probably attract people to the language. Hence make it more feasible for webhosts to offer python friendly environments. And that should be a good thing? Especially in the context of OP - "how do PHP guy start with python"?

<comment><USER21> >And yes: Mitsuhiko seems to be a super cool, clever and friendly guy. In my last project I played around with request. Lovely it was.

That would be kenneth reitz <https://github.com/kennethreitz>

But I do agree, mitsuhiko is a super-cool guy!

</comment></comment></comment></comment><comment><USER22> Personally, I _like_ PHP because, at the core, it is a collection of utility functions to write webapps quickly. Here's a small set of those function that I would like to see somewhere else (like in Python for example):

Save a file: file_put_contents()

Load a file: file_get_contents()

Trim whitespace: trim()

Print a string (even numbers!): print $str

Dump an array: print_r()

Print the stack trace: print $e->getTraceAsString()

Want to embed HTML? Go ahead, _without_ any of this nonsense: print "<table><tbody><tr><td>"+str(val)+"</td></tr></tbody></table>"

Want to check for errors and improve the quality of the code? Go ahead! Use lower level functions like fwrite, fread, etc; most functions return FALSE on error, use try/catch, throw Exceptions, create custom Exception classes, go nuts with over-architecting if that's your thing.

Also, as someone who knows C and C++ rather well, I find PHP completely intuitive, very easy and flexible, as opposed to:

      if __main__=="__main__":
          main()

and passing self around is just plain redundant.

The icing on the cake is that a huge part of the built-in functions wrap and extend existing C functions: strpos, strlen, so the language rarely gets in your way. The docs are pretty good (there's room for improvement).

So you can be a zealot all you want, but the truth is: the language doesn't make your code reliable - YOU make the code reliable and, from my experience, people who bash a language rarely know what they're talking about and it usually just boils down to personal preferences like braces vs no-braces.

Lastly, I wish you all the best in your fanatic bashing of a good tool that has proven itself appropriate for web applications. Everyone's tired of the following example, but I'm going to say it anyway: Facebook (and thousands of other large websites). Feel free to be in denial about that.

<comment><USER23> In Ruby:

        # Save a file
        f.write(str)

        # Read a file
        f.read

        # Trim whitespace
        " foo ".strip

        # Print anything
        puts 1 # even numbers!
        puts File.open("foo", "w+") # even file handles!
        puts [1, 2, 3, 4] # even arrays!
        puts [].class # even classes!
        puts [].method(:size) # even functions!

        # Dump an array (see above)

Python is similarly clear:

        # Save a file
        f.write(str)

        # Read a file
        f.read()

        # Trim whitespace
        " foo ".strip()

        # Print anything
        print 1 # even numbers!
        print open("foo", "w+") # even file handles!
        print [1, 2, 3, 4] # even arrays!
        print [].__class__ # even classes!
        puts [].remove # even functions!

        # Dump an array (see above)

Ruby and Python are _extremely_ well documented. They have great standard libraries which wrap existing C functions too...and wrap them in a _consistent_ fashion. They are also the second and third most popular language on Github, respectively...which means tons of great libraries to solve almost any problem you can think of.

Ruby and Python are just as easy to use as PHP.

<comment><USER24> Not sure about the Python ones, but the Ruby read/write file examples aren't quite fully done/correct here:

      # Equivalent of file_put_contents() in PHP
      # This could also be used for appending if the correct mode is specified.
      File.open("filename", "w") { |f| f.write("some data") }

      # Equivalent of file_get_contents() in PHP
      some_var = File.read("filename")

<comment><USER8> Ruby 1.9.3 added File.write("filename", "some data").

<comment><USER24> Cool. Didn't know that. Thanks.

</comment></comment></comment></comment></comment><comment><USER25> This guy failed to cover web.py which is one of the fastest ways to start prototyping a web app in python. =/

<http://webpy.org/>

I personally use it for a small app which returns (and stores) search suggestions from redis.

</comment><comment><USER26> I was thinking this could redeem the author's credibility a little after the PHP rant, but the irrational hatred for Cheetah sounded very familiar.

I only used it in one project, a few years ago, but there's really no bad thing about it I couldn't say about any other templating system in any language I ever tried.

I wouldn't really take offense with that, but while the XSS chapter still has some points, the Sanitizing chapter goes on to bash PHP for a subjective trend of sanitizing (examples?) just to go on and present an example of sanitizing.

In general, it was a decent article, but sadly again much more opinionated than needed. It's one thing to suggest one technology over the other but it doesn't help to make people who actually agree with your point have their eyes rolling every second paragraph. (That the author doesn't like MySQL was to be expected after the PHP rant as it usually goes hand in hand, but showing some real reasons for Postgres over MySQL would have been nice.)

Still the same criticisms apply, I'd wager most people use PHP (or MySQL for the matter) because it's MINDBLOWINGLY AMAZING, but because a) the infrastructure is set up (especially DBAs hate to mix and match in my experience) b) the people at hand can use the language and use it well c) it gets the job done. quickly. sometimes "good enough".

<comment><USER8> Explaining why what he does not like about MySQL would have been moving too far from the subject of the article.

And I liked the sanitizing chapter. It explains well why "sanitizing" is a misused word, which should be avoided. Almost always when I see people call it "sanitizing input" they do not seem to know how to handle input correctly.

<comment><USER6> I don\'t see the problem with \"sanitizing\". It\'s easy: just add a \\\ before every quote and the string is totally safe!

</comment></comment></comment><comment><USER27> I like java for web app development, simply because it has a well-structured api and a massive community of developers who have run in to the majority of the road blocks you will most likely encounter on the way to launching your app.

<comment><USER28> What frameworks and platforms would you recommend for web development with java? I am writing my senior project at college in java (mainly because of the wide amount of image processing libraries available) and would love to add web capabilities.

<comment><USER29> I tend to prefer Python/Flask for Web dev to Python but if you are inclined to use Java there's only really one framework that doesn't make me want to tear my eyeballs out.

That framework is Spring MVC.

It is DI, adapters for vendor-specific libraries and utility. It's probably not the easiest thing to start with just because it is so flexible that it can be hard to know where to start. A good "Hello World" Spring MVC 3.1 app would go a long way.

I really would like to use the Play Framework and it's so close to being great but it just falls too far short.

I really liked Play 1.x with Groovy templates. It was simple and it pretty much just worked.

Play 2.x has gone in a radically different (and backwards incompatible) direction. It is now part of Typesafe and the goal of Play 2.x is to make Scala a first-class citizen.

The problem is that many of the niceties of Play are either harder to use or just outright missing in Java Play 2.x (eg AppEngine support and the OAuth client were all present in 1.x and are slated for a future 2.1 release).

There really is a niche for a Java Web framework that like Play ditches the JEE/servlet model in favour of the Rails/Django way of doing things (including dynamic class reloading) but doesn't do it in a way that makes me want to stab myself repeatedly.

This would include playing nice with the Java ecosystem (seriously just use Maven and to hell with SBT).

<comment><USER30> Grails (grails.org) is Spring under the hood, good MVC layer on top, and gives you Java or Groovy wherever you want to use it. For people coming from a dynamic language background (php, python, ruby, etc) I've found that Grails is a good middle ground option.

</comment></comment></comment></comment><comment><USER31> I really don't think it's worth taking this guy seriously. First he writes a worthless and inaccurate lambast of PHP, and now he's trying to "convert" people to Python by telling us Unicode sucks. Get a life.

<comment><USER32> > _... by telling us Unicode sucks._

Could you tell us where he did this?

(I didn't notice it on the first time through; he did say to use Unicode everywhere inside your code, though, and to not do anything rude like converting Unicode to ASCII by stripping non-latin1 characters.)

<comment><USER33> Right under the big bold "Unicode" header. The very next line is

 _> Unicode sucks. This is a universal truth._

(In fairness, I think what he's really getting at is that _dealing with Unicode in languages that were created before it became ubiquitous_ sucks, not Unicode itself. But if you start off your discussion of Unicode with the statement that "Unicode sucks", you shouldn't be surprised if people think your beef is with Unicode rather than with the tools we use to deal with it.)

<comment><USER32> Point. Mind you, he follows that with:

 _"(I'm lying. Dealing with encodings sucks. Unicode is great. It's complicated. I'll write about it later.)"_

I think I'll wait for the follow-up article.

</comment></comment></comment></comment><comment><USER34> Good article apart from one thing - avoid the hell out of session state. This becomes the dumping ground for all sorts of crap and will slowly knacker your app. You should only persist enough information to identify the user between requests and keep the rest stateless. We do that using encrypted cookies containing the user id, display name and correlation id.

I've just spent 6 months entirely removing session state from an asp.net app and the performance gain is amazing.

</comment><comment><USER35> Great article! For those of you who say how easy PHP is, it's because you don't remember the early days when you had to compile php to run on your box, only to watch it fail after an hour of compilation :) history aside, these are just tools. For many site, perhaps for majority of tasks, PHP might be the best tool for the job. Once you start doing more complex stuff that will require additional libraries and modules then you need to look into other languages.

I used servlets from very early days, just because I could never understand another man's perl code and I thought the architecture was better. However J2EE got so big and academic that took all the fun out of coding. I've recently started to do some stuff in python and the fun is back again. I love all the NLP libs that are available for python in addition to vast support and ease of coding. Not to mention, I like the python community more than ruby (rails really). It just seems like python guys come from a stronger CS background and are not some over-night rail guys who want to push their faith down your throat.

</comment><comment><USER36> By far the easiest way to get started with Python web development is Web2py which comes as a self-contained install where you can get started in 5 minutes. So you automatically get "request" information, big deal.

<comment><USER6> Flask comes as a self-contained install where you can get started in 5 minutes.

<comment><USER36> Flask doesn't help much with the database.

</comment></comment></comment><comment><USER37> I've seen Flask mentioned here few times. Is Flask better than Bottle?

<comment><USER38> In my humble opinion.. Yes. I feel bottle sacrifices just a little too much for the sake of being a single file distribution. The lack of any (mainstream) templating engine might hinder newcomers, and Flask uses one of the best python templating engines around. I also find Flask's documentation to be more extensive and better laid out. Overall I would recommend Flask if you want to write a full featured website, Bottle if you are looking to write some kind of API layer, or similarly bear bones functionality, and will not require many "batteries included".

<comment><USER37> You can use Jinja2 with Bottle:

> pip install Jinja2

from bottle import jinja2_template as template

</comment></comment></comment><comment><USER39> In python, stay away from default arguments for methods/functions.

EDIT: yes, mutable default values:

<http://effbot.org/zone/default-values.htm>

<comment><USER40> Do you mean don't use defaults that contain mutable values?

</comment></comment><comment><USER41> What's wrong with mysql?

<comment><USER42> Apparently, it isn't PostgreSQL; If you have no need for Postgres features and you're not familiar with it, sticking to MySQL is fine.

<comment><USER13> Well you can say the same for windows vs Linux or visual basic vs any other language, and you can also continue using paper glue to attach paintings on the wall.

It is not a matter of what you need, it is a matter of using good tools that will help you do good work, understand better what you do, build durable products, and so on.

Just one example: MySQL will not complain if you add a check constraint but will not actually add it to your schema. That's a very Microsoft-y way to handle things, and should give cold sweat to any coder.

<comment><USER42> This is actually documented behavior: "The CHECK clause is parsed but ignored by all storage engines." From: <http://dev.mysql.com/doc/refman/5.5/en/create- table.html>

I believe it was left to support certain migrations(?). You can create a trigger instead.

I'm pretty certain many people will consider MySQL a good tool with which they produce good work. While it may have its quirks, it's present on virtually all shared hosting environments, just like PHP, so it's very easy to create and deploy an application powered by both these technologies.

<comment><USER13> So, you are telling me that it is a good thing, a normal behavior for a reliable tool to just ignore instructions I send to it and do nothing with it, not even a warning? So when I migrate a database, I have to carefully check each and every instructions (schema and data) and make sure MySQL did not "decide" it was not worth it and just silently threw it by the window?

I have hard time to believe you are serious here...

<comment><USER42> I'm pretty certain when you migrate from a different database you're supposed to check your schema and data anyway, or do you just "decide" it should work without question?

I'm not saying this MySQL behavior is acceptable, I'm just saying that you should be aware of the limitations and quirks of the tools you work with.

<comment><USER43> So it's not acceptable behaviour, yet we shouldn't point it because we should know it has this unacceptable behaviour? Doesn't make any sense to me I'm afraid.

</comment></comment></comment></comment></comment></comment></comment><comment><USER44> off-topic: love the greek-lettered ordered list.

</comment><comment><USER45> Should I really learn Pyramid instead of Django? I'm thinking about what would give me most value as a developer, one who already knows his python.

<comment><USER46> It's a tradeoff. Django is a full-stack framework, which integrates lots of components such as templates, form generation, and an ORM. This means that you can get off the ground quicker, and that the community is all more or less on the same page. The downside is that if you want to do something that Django isn't good at (complicated database stuff, logic in templates, etc), you are in for a world of pain (reportedly). Overall, Django is a great default for making CMS-type sites, but can become a technical debt if your requirements outgrow it.

Pyramid, on the other hand, deliberately not a full stack framework, sacrificing ease-of-use for flexibility. It doesn't include any database opinions at all, can swap templating languages on a whim and wouldn't know a form if you hit it over the head with one. The upside is that it has first class core components, really well defined extension points, an unmatched routing system, and a few truly excellent plugins (I love you pyramid_tm). The downside, of course, is that you will own your entire stack, which means that A) there is more up-front work researching, designing, and developing your application's component stack and B) there's no central community guaranteed to be using the same stack as you. Overall, pyramid is suited for essentially any use case, so long as you put the work into it.

tldr: Django is (somewhat) inflexible but easy, Pyramid is flexible but more demanding. Both are excellent.

There are probably more jobs working with Django, if that's a consideration.

</comment></comment><comment><USER47> Google App Engine for Python. You don't have to configure your host, you get great tooling and documentation, and a very good community of users.

</comment><comment><USER48> Its funny how Ruby hordes overwhelms this thread talking about ruby not python nor php :-D

</comment><comment><USER17> > Some have helpers for creating RESTful routes

Can somebody point to an example of this?

</comment><comment><USER49> Great overview.

</comment><comment><USER50> Say wat you want of php. But it's (insert personal pejorative option) made for it.

Sure Its a_little_inconsistent AndSomewhatChaotic

But all the basics for the web are incredible accessible right away.

With every other language you have to start with a framework.

I find php easier than rails to prototype applications and do fast hacks that need a web face.

It's simply the right tool for the job on those occasions. Of course, later they become huge systems...

<comment><USER51> That's a nice sentiment that's completely inaccurate. Even 6 years ago when I first started programming Python, simple Python cgi scripts were very easy to write. It's as simple as:

      print """\
      Content-type: text/html

      <html>...</html>"""

With %(var)s interpolation, you can even slap in locals() easily to trivially put variables' values into the page.

<comment><USER52> That doesn't seem like it will scale very well at all. Or am I missing something?

<comment><USER53> PHP doesn't scale well either. You can rewrite for scaling later.

</comment></comment></comment></comment><comment><USER54> "I only know PHP"

"I just trashed PHP rather harshly"

"I want to learn python"

Well, you're doing it wrong. How can you trash PHP if you know _no_ _other_ _languages_ ?!

You're following articles, posts saying PHP is bad and.. you decide then that's right it's bad!

Ever though about _thinking_ on your own first? Like, actually trying a language (python, why not) _then_ deciding if it's better?

This kind of stuff always amaze me. You know, sheepish.

<comment><USER6> This is part of an FAQ series. The bolded part ("I only know PHP...") is the question I'm answering.

I'll leave you to contemplate the irony here.</comment></comment>


Some fun with π in Julia - one-more-minute http://julialang.org/blog/2017/03/piday <comment><AUTHOR> Most times a julialang.org blog post is posted to HN, I wonder whether the choice of content is well chosen to spread awareness of and interest in Julia.

I write this as a huge Julia fan; I use Julia daily, and it is both my favorite language and the language I know best. So I already think Julia is great. But reading many Julia blogs, especially those from julialang.org, would make me think Julia is only useful for very narrow scientific applications if I didn't already know better.

I like Julia because it's extremely fast and extremely expressive - and I don't just mean "expressive" as in "can be written like a dynamic/scripting language," though it can. I mostly mean that the combination of its type system and multiple dispatch allows some really elegant abstractions.

<comment><USER2> What's your working setup with Julia? I'm looking at switching over from MATLAB as soon as the semester is over.

<comment><AUTHOR> My setup is dead simple. I'm on Windows, so I use Notepad++ with syntax highlighting as my editor and do a lot via the REPL. I just use regular Julia, not JuliaPro. Installing packages hasn't been a problem for me, just Pkg.add("PackageYouNeed"). I've had very few problems with package setup in the past and none recently.

On a 4-core CPU I have the environment variable JULIA_NUM_THREADS set to 3 so that when Julia is doing threaded worked there's still a core free for web browsing.

One potential gotcha: the Julia docs will mention that you can access shell commands from the REPL by starting your line with a semicolon, e.g. ;ls. For me this only works if you start Julia from something like Git Bash, not cmd.

Lots of people seem to like Juno (junolab.org) as an IDE. The team behind it has made incredible progress recently, and sometimes I use it for its GUI around the debugger, but for the most part I tend to stick to Notepad++.

</comment></comment></comment><comment><USER3> So, sorry to change the subject away from pi, but how does Julia do on the code-gen end? Are we talking SIMD type optimizations? Are there hooks in the language for tuning hot-code?

I'm curious because I'm trying to find an example of a "non-scalar" programming language, a la this attempt here[1].

Thanks for the help!

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

<comment><USER4> Julia uses LLVM to do code-gen so whatever optimizations are available in LLVM are available to Julia. If the auto-vectorizer in LLVM is not kicking in, it is possible to write explicit SIMD with the [https://github.com/eschnett/SIMD.jl](https://github.com/eschnett/SIMD.jl) package.

</comment></comment><comment><USER5> I have always been skeptical about 'scientific' languages. Why do you need a special language when any general language + some libraries will do? This is a good example of a feature that only really makes sense in a scientific language.

<comment><USER6> In R, I can import a CSV, plot a histogram of each column, and fit a linear regression of one column against the others in about 5 minutes and 15 lines of code.

In Python, I can do the same thing if I install the Pandas and Statsmodels libraries first.

Try that in Ruby, Perl, C++, C, Java, Rust, Haskell, Common Lisp, or just about any language you can think of. Good luck.

<comment><USER7> The other great thing about R is the amount of information it outputs when you run a stats function.

<comment><USER6> It's easy to forget that R inhabits a gray area between a full-fledged programming language and a "statistics package" like SAS or SPSS or Stata or GRETL.

</comment></comment></comment></comment><comment><USER8> Monte Carlo computation of pi would be a fun addition to this post...

<comment><USER9> I actually had it in a rough draft, but didn't get it finished in time. Maybe next year.

</comment></comment><comment><USER10> This arbitrary-accuracy treatment of pi is cool, but I'd be curious to see an application where greater precision of pi than a float64 is actually useful...

</comment><comment><USER11> Genuine question, As a professional developer, why would you restrict yourself to such technology? what we should be asking here is why? give me one scenario where this language is more appropriate than the plethora of other domain specific languages. would you bet your company on such language when there is more mature languages already ?

<comment><USER6> Are you asking "why do we use scientific languages"? If that's your question, the answer is the same reason that you don't write a webserver in assembly.

If you're asking "why Julia versus other languages" it's that, well, Julia is fighting to answer that question for itself. As far as I can tell:

\- Versus R and Octave: performance, coherent syntax, and more features for writing "programs" instead of just "scripts" \- Versus Python + the Scipy stack: its scientific features are built into the language (instead of being an awkward layer on top of it) \- Versus any proprietary platform (SAS, Matlab, etc): it's open source and free-as-in-beer, and therefore not confined to legacy/enterprise applications

I'm a data scientist and I currently use R and Python. I've been wanting to give Julia a try for months, and now that the ecosystem is starting to mature (plotting and data frames are must-haves for me) it's making more sense to spend some time with the language.

<comment><USER12> Are you aware that can call R and Python from Julia with practically no overhead? And I mean that both in performance and expressiveness?

<comment><USER6> I didn't know this. Will look into it, thanks!

edit: looked up "call R from Julia", it looks like there's a n "RJulia" library for this. Assuming there's a Python equivalent? How does this compare to, say, using RPy2 in Python (which is nice but kind of annoying)?

<comment><USER13> I think RJulia goes the other way; calling Julia from R.

You want RCall.jl and PyCall.jl. Both allow you to directly work with and manipulate native objects. RCall even allows you to bring up an R REPL.

</comment></comment></comment></comment></comment><comment><USER14> Julia all the things!

<comment><USER15> I wish! It breaks my heart that this language doesn't produce standalone binary executables.

<comment><USER16> There are ways: [http://stackoverflow.com/questions/36815324/produce-a- standa...](http://stackoverflow.com/questions/36815324/produce-a-standalone- executable-from-a-julia-script)</comment></comment></comment>