NUI: style your iOS app with style sheets - <AUTHOR> https://github.com/tombenner/nui

<comment><USER2> A really interesting project which I feel might make web developers more comfortable with iOS development.

As an iOS developer however, I find that using Interface Builder or pure code is much more flexible and simpler to use than a CSS stylesheet.

</comment><comment><USER3> A strategy that I found works really well to quickly style everything is to create a category on UIView that defines a block property decorated with UI_APPEARANCE_SELECTOR, then on the setter, invoke the block. Then set the appearance proxy on app startup:

      [[UILabel appearance] setStyleBlock:^(id view) {
        UILabel *label = view;
        label.backgroundColor = [UIColor clearColor];
      }];

The advantage is that you can style properties that aren't supported by UIAppearance natively, since a block just gets run when the view is ready to be styled. You also can style subviews from the same block (ie. title label inside of a warning view should be red and bold).

</comment><comment><USER4> Relevant: <http://www.pixate.com/>

<comment><USER5> I was very excited about Pixate when I followed your link, but after the initial excitement it turned out that it's one of those stupid MVP (potentially) vaporwares that's just a cute landing page with a form for "give us your email so we can let you know when it's available" in the signup/download link... It's a concept, not a product. And for all we know, it could take a year or two before it's released. Yet, the landing page makes you believe you can use it _today_ :

"Long gone are the days of tedious image slicing [..]. With Pixate, designers and developers alike can conceive, [..]. etc., etc."

I really hate such "tricks". If it's a concept, just say so in the landing page - we won't kill you! We _will_ find out in the end - it's hardly a secret, and will be pissed when we click "Download SDK Now!" and find out it's in the early stages of development...

I might've been interested in backing them up on KickStarter, but I really don't trust them now (because of this trick they pulled on me). What if their framework has a serious bug (a severe memory leak)? Can I trust these guys to tell me so if I build my (imaginary) $50,000 app using their framework? No, I don't feel that confident.

<comment><USER6> As someone who backed them on kickstarter I probably have a biased perspective, but it seems to me that the product is coming along very nicely. They are quite open to with the development of Pixate to backers. There is also a Pixate demo app on the app store to see how it works on a device. Pity they haven't been so open with nonbackers.

</comment></comment></comment><comment><USER7> I'm really glad this is open source. I intend to make use of it in any new apps I start, and contribute back any bug fixes or improvements.

As it happens, I was going to build something like that for an app I'm due to start tomorrow, but now I don't have to.

</comment><comment><USER8> I'd use something like this if it was built by apple but I can style apps quickly enough as is without going out of my way to implement this.

As others have mentioned it's not really a "drop-in solution" and it doesn't look to be much faster than just creating categories that return styled objects you need eg: [UIButton greenButtonWithText:@"Sign up"]; [UILabel headerLabelWithText:@"etc, etc"];

</comment><comment><USER9> Looks good I may use it. Looks like you are using the MIT license which is nice and permissive but could I suggest that you leave the heading ("The MIT License") in so that people can see at a glance that it is that.

That assumes that you haven't changed the licence at all.

[Edit: License does seem unchanged. I've sent a Pull request if the creator does want to make this change.]

</comment><comment><USER10> The Three20 guys tried something similar a few years back: <http://three20.info/extension/extCSSStyle>.

It's a pretty neat concept, particularly if you have web content that needs to be styled in coordination with your app's chrome.

</comment><comment><USER11> Coincidentally I submitted a HN article earlier that included this on a list of libraries.

HN discussion url: <http://news.ycombinator.com/item?id=4880974>

</comment><comment><USER12> I REALLY want something like this. Like the others said, it must use appearance proxies whenever possible. I literally want to add the source files, edit the .nss file and it works.

</comment><comment><USER13> It's hardly a 'drop-in' solution if you have to change all your UI views to inherit from the NUI equivalents.

I could never use this based on that requirement.

<comment><USER14> [NUIRenderer renderButton:myButton];

<comment><USER13> Yeah that doesn't really make it drop-in either though does it.

The fact you have to litter you code with NUI references is a non-starter for me.

They should have leveraged the UIApperance proxy. I know they have some reason about gradients or something for not using it, but that shouldnt force a compromise in the design.

<comment> shawn-butler Can't speak for the author but UIAppearanceProxy is iOS 5.0+, also only a subset of the UI classes respond to the UIAppearance protocol.

<comment><USER13> Yeah, though targeting iOS 5 and up is really a non issue these days.

UIAppearance actually supports any property on any UIView, including your own custom classes. The UI_APPEARANCE_SELECTOR declaration on the UIKit properties is little more than for the purpose of documentation to make it clear what is officially supported and tested for.

<comment> shawn-butler Thanks for this info. So that means that UIAppearance is just some implementation hack on KVC? That is very useful and very ugly at the same time.

</comment></comment></comment></comment></comment></comment><comment><USER15> I'd love to try this out with RubyMotion.

<comment><USER16> Teacup is a RubyMotion-only stylesheet. <https://github.com/rubymotion/teacup>

<comment><USER17> Don't forget Motion Layouts as well: <http://malkomalko.github.com/motion- layouts/>

</comment></comment></comment><comment><USER18> Hm, I see NUI uses method swizzling, which in fact a potential reason for app rejection.

</comment><comment><USER19> Wow super cool - i wonder if it works with ruby motion? I don't know why it wouldn't.

</comment><comment><USER20> Anybody tried it with RubyMotion yet?</comment>


Document Clustering with Python - <AUTHOR> http://brandonrose.org/clustering <comment><USER2> If you like this, you might like this post I wrote a while back: [http://datasyndrome.com/post/69514893525/yelp-dataset- challe...](http://datasyndrome.com/post/69514893525/yelp-dataset-challenge- part-0-geographic)

</comment><comment><USER3> It would be really interesting to see a visualization (maybe using PCA) of the LDA vectors for each document. The topics are not super convincing that the LDA approach worked well.

Other than that, this is a good intro to NLP and calculating document similarity. Well done!

</comment><comment><USER4> I'm very interested in ways we can expand LDA (and other topic models) to retain more of the meaning of the documents, especially for small feedback (like reviews), such that a human could explore the results and find impactful, actionable data.

Using N-grams increases the dimensionality way too much.

I've thought about word-vectors as an option, but am unsure how similar terms could be grouped internally in LDA.

This kind of subject is probably worth a PHD thesis, honestly.</comment>


Show HN: Automated Pipelines to Your Kubernetes Clusters - <AUTHOR> https://www.distelli.com <comment><USER2> What's the preferred workflow when continuously integrating and deploying in containers? At what step do you run your automated tests? Do you run them in the same image that will go into staging and then production? If using the same image, do you ship to staging and production with test dependencies included, or how do you strip away test dependencies first?

<comment><AUTHOR> There are many way to do this but we (distelli) recommend the following:

1\. Run automated tests during container build (maybe in the AfterBuildSuccess step)

2\. Have a single image that goes to both staging and production. Pass in environment variables or configs to operate the image differently in staging or prod

3\. Don't include test dependencies in the image so the image is smaller. So if you're running tests etc don't add the tests and dependencies in the Dockerfile. Instead have your CI system run the tests.

<comment><USER2> > Instead have your CI system run the tests.

Is "your CI system" typically distelli or another vendor?

<comment><AUTHOR> We (distelli) do provide our own CI system but you don't have to use ours. You can use your own CI system and kick off the pipeline from that.

Some of our customers use Jenkins while others use one of the many hosted CI systems.

<comment><USER2> I like the flexibility from the point of view of minimizing the initial configuration work when we already have a CI vendor in place.

To be precise - Can distelli work with GitHub's CI API so that the distelli container build kicks off only after GitHub reports a CI pass?

<comment><AUTHOR> Yes, we can kick off a kubernetes deployment based on the pipeline rules you specify from any CI server that can make an API call to our service.

So you can use Jenkins or Gitlab CI or any other CI you like and when that system reports a CI pass we can kick off the deploy to your k8s cluster.

<comment><USER2> Thanks for explaining!

</comment></comment></comment></comment></comment></comment></comment><comment><USER3> How is this product different from hosting your CI like Drone, which can automatically do your CI testing, then with the help of plugins create a Docker image for you based on conditionals if you will, and finally upload the generated image to your public or private registry??

BTW, I can confirm your site still not loading, time again for a kubectl scale.

<comment><AUTHOR> Distelli offers a visual dashboard around Kubernetes that makes working with Kubernetes extremely simple. It allows users to set rule-based visual pipelines that make automatic updates to one's Kubernetes cluster while also allowing one to work with the Kubernetes YAML system.

By looking at the distelli UI one can easily see who did what build or deploy and when. One can even restrict certain actions from certain users by placing users in permission groups.

Additionally, distelli provides a dashboard to provision and manage clusters on multiple clouds providers.

Finally, while distelli offers a build system for CI, it also works nicely with other CI systems so one can use Drone and Distelli together.

edit: grammar

<comment><USER4> We do this by checking a `kubernetes.yaml` in with the source code. That way it gets bundled with the image as part of a Jenkins build. Deployment is just a docker pull, extract kubernetes.yaml, and kubectl patch.

</comment></comment></comment><comment><USER5> hi @kt9, in the kubernetes dashboard, when adding an existing cluster, under "Select a Provider" there is AWS. that means that it also support ECS? I am not aware of AWS supporting kubernetes directly. I have a k8s cluster running on an aws autoscaling group, but I guess in that case I should just click "Other". What's the AWS option for then?

<comment><AUTHOR> Hi,

AWS doesn't support kubernetes natively. We allow you to either launch a new kubernetes cluster on AWS by launching new VMs and installing kubernetes, weave and etcd or we allow you to sync an existing kubernetes cluster running on AWS by providing the k8s master endpoint.

We don't currently support ECS clusters but that is on our roadmap.

<comment><USER5> just for curiosity, what do you use for creating a k8s cluster on aws? Do you use any of the available open source tools like kube-up, coreOS on aws, kops, etc? And if I decide to stop using distelly and preserve the cluster created, will I be able to do so?

<comment><AUTHOR> We have our own software to create k8s clusters in AWS using weave for networking. We looked at kube-up etc but our customers wanted functionality that didn't force them to create a brand new VPC created but instead just launch multiple clusters in an existing VPC.

FYI we are going to release our kube laucher as open source in the next few months. If you sign up for our mailing list or email me at email@example.com (or follow us on twitter / fb) i'll notify you when thats available if you're interested.

</comment></comment></comment></comment><comment><AUTHOR> Hi everyone,

We found that the site was slow because we were getting throttled by a table in DynamoDB which explains why kubectl scale wasn't helping as much as we had hoped. We were adding capacity, just not in the right place.

We've added read capacity to our table and things are faster now.

<comment><USER6> Perhaps your marketing pages should be static? Rookie mistake?

<comment><AUTHOR> They are static pages served from the same webserver but there was a bug where we were erroneously hitting a DynamoDB table.

<comment><USER7> Was that bug, now another bug?

CloudFront is your friend. :-)

</comment></comment></comment></comment><comment><AUTHOR> I'm the founder at Distelli. I'm happy to answer any questions.

<comment><USER8> Looks like a cool product, but the site is really slow right now. Time to 'kubectl scale' up...

<comment><USER9> yeah the sites not even loading for me...

<comment><USER9> right after i make the comment, it loads.

</comment></comment></comment></comment><comment><USER2> What all does distelli do to make image builds fast? For example, where do you store cached layers so they are most rapidly pulled by the build worker?

<comment><AUTHOR> You can use your own build servers with distelli and any images and layers pulled down during one build will be cached and available on subsequent builds. So even though distelli is a hosted service you don't have to run builds on our shared build machines. You can fire up your own build servers and connect them to our service and you'll get all the benefits of a dedicated build server including caching.

[https://www.distelli.com/docs/kb/using-your-own-build- server](https://www.distelli.com/docs/kb/using-your-own-build-server)

<comment><USER2> Gotcha. I am seeking a vendor that handles this for us somehow (even if that means we must pay for dedicated resources managed by the vendor). CircleCI has spoiled me so that I'll never maintain a Jenkins or other build server again if I can avoid it. CircleCI has hinted that their v2 (which is in alpha) will address layer caching.</comment></comment></comment>


Ask HN: What CRM/PM/DM/TT application do you use? - <AUTHOR>

We are a small (< 10 ppl) startup that is pretty evenly balanced between technical folk and business folk. We have been searching in vain for an all-in-one CRM/PM/DM/TT application to satisfy our needs. Our needs are not that demanding - basically this is what we want:
CRM: lightweight contact manager, Companies/Contacts, has an Internal/Employees distinction from Companies/Contacts and an ACL/permissions model.
PM: A simple Company -> Project -> Task structure. Gannt charts, timesheets, etc. are overkill. Simple Milestones suffice.
DM: Should have ability to create folders, checkin/checkout and create a workflow/approval based on a document.
TT: Ability to create tickets/tasks via an email queue/gateway. Ideally supports more than one so could create one for post-sales (support@) and one for pre-sales (info@). Auto-reply, Standard Responses nice to have. Ability to respond to email/customer within application.
Other: Calendar, preferably SaaS (with SSL and unified login) and ~ $10/user/month.
We have looked at dozens of candidates (too many to list) and they all have certain strengths and weaknesses but none have satisfied them all for us.
IMO, the best one so far is the open source dotProject but its email queue/gateway is pretty weak. (I know its open source and we could improve it but we don't want to go that route.)
Would love to hear what you are using to satisfy similar requirements or if you just gave up and used multiple applications (which we're trying to avoid).
Cheers <comment><USER3> You may have already considered it, but I believe that the zoho suite will take care of a lot of your requirements. They have different components, so you may have to pick and choose what you want your employees to use, but (based on the quality of their docs system), I'd imagine their overall quality is quite high.

<comment><AUTHOR> Yah, we looked at it a long time ago. Didn't like the disparate applications aspect to it. And for us the Company -> Project -> Task structure in a PM module is highly desirable.

Thanks for your suggestion.

Cheers

</comment></comment><comment><AUTHOR> Since I didn't get many replies I would suggest that an opportunity exists for someone out there to build this and disrupt the market :-)

The hard part will be differentiating yourself in a very noisy market - <USER2> products that deliver value always find a way.

Cheers</comment>


Wolfram Alpha Miscalculates What Its iPhone App Should Cost - <AUTHOR> http://www.techcrunch.com/2009/10/18/wolfram-alpha-miscalculates-what-its-iphone-app-should-cost/ <comment><USER2> Of course, their graphing calculator comparison neglects the fact that graphing calculators are only priced so high because they have a captive audience, like college textbooks. You can't effectively compete with TI for graphing calculators because school districts outlaw competition.

</comment><comment><USER3> With the exception of solving integrals, diff eqs, or other CAS things, is Wolfram Alpha particularly useful when you'd have google at your disposal? I would think no, but that's just my experience.

<comment><USER4> Google is a search engine, Wolfram Alpha is a computation engine.

<comment><USER5> But how often do people actually compute? The majority of all computer use is for information retrieval/display. If wolfram alpha had a spreadsheet interface then maybe people would use it, but once again right now there isn't that much that people compute.

</comment></comment></comment><comment><USER6> Wolfram continues to surprise me with the depth of his delusions.

$50 for an unfeatured 'native' interface to a free web app?

<comment><USER7> That last sentence is misleading. The web app that they're interfacing is only free because they made the mistake of making it free. If this iPhone app was the only available interface to Alpha, and they hadn't blown their marketing wad on a huge marketing launch for the free web version, $50 wouldn't seem nearly as "unreasonable" as it does now.

<comment><USER8> Maybe it could have then been positioned as portable mathematica + cool data sets.

BTW: I don't get all the contempt for Wolfram. He's accomplished more than most (all?) of us. I think he's entitled to as many mistakes and delusions as it takes in between accomplishments. And we'd all do better if we followed his example, of optimistic experimenting.

<comment><USER9> He's the last of many of a long tradition of mathematicians that thought their mathematical work to be the solution to everything. A bit grandiose in his claims.

<comment><USER10> I've read criticisms that he makes it appear as though certain ideas are of his own creation, but beyond that, I think the guy is quite brilliant. His work on cellular automata as Turing machines is very intriguing. I think more people should give him his due.

</comment></comment></comment></comment></comment><comment><USER11> Isn't this just a less thinly veiled version of I Am Rich?

<comment><USER12> Does it strike anyone else here as ironic that people with $600 phones that cost $100 a month with a two-year contractual minimums would look at software priced more than $5 as conspicuous consumption?

<comment><USER13> The phone costs 199 and 75 a month. It is expensive, but why exaggerate?

<comment><USER14> he's not really exaggerating, though. i bought my iphone in the first few days after release, and i did indeed pay 600 bucks for it. it has come down since then, but there _are_ those of us who paid that.

i can't remember the exact details, but the cost for the data plan went up after they introduced 3g support, and dropped the 200 free text messages per month.

</comment></comment></comment></comment><comment><USER15> I think they priced the iphone app high so people will think their free web version is a bargain and actually worth using. "Hey, I can get it for free on their website!" Even though they weren't using it at all before.

</comment><comment><USER16> This is another example of a company trying to price software like its a physical product.

The justification for the price is laughable; just because it contains more features than an unrelated product (for which it is not even a feasible replacement) is not going to convince someone to pay for an iPhone app 25-50x the normal going price.

I'm venturing a guess here by saying that a good portion of the market for graphing calculators is comprised of high school and college students, and I don't know of one teacher who would allow an iPhone during a calculus or physics test.

<comment><USER17> there's a fun point. If the only way to use it is connected to the internet - how are you going to be allowed to use it in a test/exam scenario?

<comment><USER18> Personally I think more high-school/college tests should be given with the students using computers & the internet while taking them, since that's how the world works now. Not all tests by any means, but more than currently. But until that point, letting some students use their iphones because it's also their graphing calculator, on a test where most students don't have access to the internet and their friends and other test takers with iphones, is an invitation for cheating.

</comment></comment></comment><comment><USER19> I have a feeling this is all a publicity stunt. The hype has pretty much died down. What better way to get people talking about your Service and your iPhone app (beside apple rejecting it) than to grossly overprice it (see "I am rich" app)? At least you get to see if people will actually pay for it and the free press.

Edit: I'm pretty sure they'll lower the price, which in turn will trigger more press. Seems to me a good marketing ploy, but how far can you go before you dilute your brand message?

<comment><USER20> Wolfram is not the sort of company the engages in marketing ploys. They've always charged a hefty amount for their products, from Mathematica to their crazy prices for API calls. They get away with it because they create niche products that are usually paid for by the user's employer.

</comment></comment><comment><USER21> At least for students, a graphing calculator on an iphone won't be much use, since most teachers probably won't let students whip out an iPhone on a test.

TIs are standardized and profs know what it can and can't do. No professor is going let students whip out arbitrary applications to aide them on a test, especially one that can almost solve word problems.

<comment><USER22> "No professor is going let students whip out arbitrary applications to aide them on a test" -- oh the things we used to do with our TI83s...

<comment><USER21> Actually yes I agree you can put arbitrary applications on TI-83s that can help you cheat. So let me rephrase:

No professor is going let students whip out _blatantly_ arbitrary applications to aide them on a test.

</comment></comment></comment><comment><USER23> _A note on price — it is listed at $49.99, which is basically less than 1/2 the price of a graphing calculator with inferior functionality in comparison, which is how the company came to that number._

That's a bit disingenuous, considering that the hardware doesn't come free.

</comment><comment><USER24> Right. Because who could build a successful company selling soft that can do some math priced at thousands of dollars? Isn't the math free?

People who would buy nice mobile interface for wolfram alpha are not the same people that buy "paper toss".

</comment><comment><USER25> I find it humorous that the Tech Crunch author notes a typo while creating a few of his own, e.g., by spelling "default" incorrectly. One who notes a typo should to not to create one of their own, if only to save face.

<comment><USER26> Ah, but Wolfram using "egonomics" _is_ too rich.

<comment><USER25> Agreed - it was a great reference.

</comment></comment></comment><comment><USER27> I remember an HN comment about Dr.Wolfram over estimating himself (in a book preface or something). No wonder that the iPhone app follows.

</comment><comment><USER28> $50 isn't much for professionals who pay hundreds of dollars for reference manuals ... or are on location in NE Turkey without laptop Mathematica access.

I'm guess W intends an access lite for later.

For decades, most tech products coming on the market start out high-priced (HD TV's for a recent one). Why should Wolfram look like it's low-balling? They know you've got a $200+ phone and are paying $1K a year to use it. Mathematica isn't cheap either: how much will the App cut into sales?

<comment><USER20> The iPhone application still requires Internet access. If you seriously needed to reference Wolfram Alpha for your work, then you would most likely be within reach of an actual computer. This app is nothing more than a novelty and is ridiculously priced.</comment></comment>


What makes a city approachable? - <AUTHOR> http://blog.citygro.ws/post/71402111743/what-makes-a-city-approachable

<comment><USER2> This is a sound description of Tokyo and other Japanese cities. As good as the US is at reinventing itsef I doubt this observation could be applied there. Those casual encounters that for instance Tokyo city design allows, are predicated on a consensual society which, for good and for ill may never exist in the US. The price Japan pays for social cohesion is cultural uniformity. It would be great to have the best of both though and no doubt it can be achieved at smaller scale.</comment>


Ask HN: Why IPsec isn't already the "norm"? - <AUTHOR>

Or in other words, Why IPsec isn't the standard? <comment><USER2> Two reasons, I think.

First, it was overcomplicated. IKE is widely regarded as one of the most complex crypto protocols ever to come out of the IETF. It's a nightmare to implement and not much easier to deploy.

Second, the policy layer is underspecified. IPSEC works for point-to-point VPN links (though it's not the simplest or best way to get that). It could work opportunistically (but was never deployed that way). But what other service model is there? How do I use IPSEC to talk to Google? How does my stack know who Google is? There are solutions for these problems, but not in mainstream IPSEC implementations.

So, IPSEC became a VPN protocol instead.

</comment><comment><USER3> Have you ever tried routing IPSec traffic through a NAT? It sucks. Oh and NATs are everywhere, every home, every office, so that alone might hamper adoption...

Here's a Cisco article that touches on it:

[https://supportforums.cisco.com/document/64281/how-does- nat-...](https://supportforums.cisco.com/document/64281/how-does-nat-t-work- ipsec)

Wikipedia even talks about the problem:

[http://en.wikipedia.org/wiki/NAT_traversal#IPsec_traversal_a...](http://en.wikipedia.org/wiki/NAT_traversal#IPsec_traversal_across_NAT)

Maybe when IPv6 is common and NAT goes away... But frankly NAT is too useful as a "firewall" surrogate.

Plus what does IPSec really bring that SSL doesn't? It hides port numbers? Meh. For the headache that IPSec setup is, I'll live with the NSA seeing I connected to port 80. Even with IPSec they still know the IPs on both sides. For VPNs give me OpenVPN over L2TP/IPSec any day of the week (plus setting up UDP encapsulation on Windows is a huge PITA).

</comment><comment><USER4> Early adoption of end-to-end IPsec fizzled because of PKI problems and absence of IPsec support in operating system IP stacks, and corporate "connect to our swiss cheese intranet" VPN use case eclipsed the end-to-end usage. VPN use then evoured 99.9% of user/developer/standardization mindshare.

</comment><comment><USER5> Did they ever figure out how to prevent downgrade attacks?</comment>


13 Negative effects of secrets - <AUTHOR> http://bobgroves.com/13-negative-effects-of-living-with-secrets/

<comment><USER2> I am a big believer in the truth shall set you free. But this is about "dirty secrets". Not all secrets are like that. If you have any kind of privacy, you have "secrets". And it isn't necessarily a bad thing.

The "secret sauce" of a company can be the key to its wealth and success. Secrets are not inherently evil per se.

<comment><AUTHOR> def agree 100%. thx for reading & replying. there are some things that are private that are not bad at all...

</comment></comment><comment><AUTHOR> great article about the way secrets harm us

<comment><AUTHOR> thx for reading...</comment></comment>


Why I use Object Pascal - <AUTHOR> https://dubst3pp4.github.io/post/2017-10-03-why-i-use-object-pascal/ <comment><USER2> As I get older, I'm strongly swinging into the camp that thinks languages should have strongly restrictive syntax. Object pascal is one of those languages which is both low level enough to cleanly map to efficient code, as well as high level enough not to feel really restrictive. Its a language that is completely misunderstood because far to many people read a couple critical essays, and believed everything they read, even though the strongest argument frequently was that its harder to type "begin/end" than "{/}". Which is a pretty lame thing, given code completion in editors as old as emacs.

Put another way, the thought patterns programmers fall into when using it seem to result in code which is easier to understand than most other languages which seem to encourage "perlism" (creating a single unreadable line), "forthism" (creating a billion two line words that combine to solve all the problems in one word), or a few other things which become completely unmaintainable when the project grows beyond what can be written by a over- energetic student in a semester at school.

<comment><USER3> I don't think anyone really disagrees with you -- most people have problems with the syntax of Perl, C, and C++. Sure, they can get used to it, particularly with C because it's small, but the syntax isn't why they use the language.

Somewhat surprisingly, I think Perl's syntax is one of the reasons that Python became popular. Perl can do pretty much everything Python can, and it came significantly earlier. Yet people gravitated toward Python.

I wouldn't call Python "strongly restrictive", but I would call it "just right". It's terse without being unreadable.

JavaScript syntax is also pretty sane (but there are many horrible parts to the semantics.)

Ruby seems to be pretty nice in the common cases, but there are apparently gremlins lurking in corner cases. Python has only 1 or 2 syntactic gremlins I can think of (trailing comma, etc.)

<comment><USER4> _> Perl can do pretty much everything Python can, and it came significantly earlier. Yet people gravitated toward Python._

I don't think syntax is the main culprit here, and Perl is only four years older than Python. For about 15 years Python tried, unsuccessfully, to compete with Perl as the premier language for shell scripting and sysadmin tasks. It wasn't until around 2005 that Python finally caught on, its rise coinciding with Ruby. While I do personally find Python more readable than Perl, I attribute its ascent more to the combination of the Web 2.0 gold rush demanding dynamically-typed languages for quick prototyping, Perl's apparent mid-2000s limbo due to Perl 5 vs Perl 6, the then-declining reputation of PHP and the shared hosting services which first popularized it, and the quality of Python's standard library (which made up for CPAN).

<comment><USER5> I have long thought Perl can do _anything_ Python can, and then some. I still use Perl one-liners to find/change strings in code bases:

perl -pi -e 's/somestring/newstring/g' $(ag -l --python Foo)

Does Python have an equivalent?

I think the fabulous Python libraries for data science have really propelled the language to the top of the list, in terms of users.

<comment><USER6> You could have just used sed for that?

<comment><USER7> So Perl was built because Sed/Awk had "whipupitude", but fell short of being a real application language like C which was great and fast to run, but slow to develop in. Perl was the middle ground which took the power of Sed/Awk/Bash and made it faster and more respectable and added a huge module repository. Of course take this with a grain of salt.

</comment></comment></comment></comment></comment></comment><comment><USER8> I feel kind of sheepish to admit that "Why Pascal is not my favorite programming language" had a huge impact on me and caused me to avoid Pascal until I was forced to deal with it because a coworker quit and dropped maintenance of an in-house application in my lap.

I was happy to realize that most of the criticism in that essay no longer applies to relatively recent versions of the language/IDE (Delphi 7 in my case).

One huge advantage if Pascal is that it is very easy to read; the code does not look or feel pretty, but it is so easy to read I could get an idea of what was going on without any prior knowledge of Pascal within a few hours.

Keywords not being case-sensitive felt weird at first, but one gets used to it very quickly.

<comment><USER9> My High School programming class was taught in Pascal (Turbo Pascal version 3 IIRC). I remember liking it just fine, but when I went to the university I switched to C because everything interesting was written in C. Also, there were no Pascal compilers in the FreeBSD (2.0) ports tree back then.

I had a notion that Pascal was a "toy teaching language" too, but for what I was doing that didn't really matter.

<comment><USER10> You must be 50... and you're still on HN! Are you still an engineer? If so, what stack are you using now?

<comment><USER9> You are off by about a decade. FreeBSD 2.0 was released in the mid 90s.

I still skim Slashdot too.

Most of the time I'm working on ancient versions of RHEL that are never connected to the internet so I don't exactly get to use "stacks" or anything that wants to pull code from Github. If it doesn't come on the RHEL 5.5 disk it's not available. You might be surprised how much you can do with a modest CGI script, a touch of JS, and some basic styling CSS.

<comment><USER10> I clearly misjudged the time of Pascal's popularity and have never heard of RHEL but thanks for the response!

What is Slashdot's strength from your POV?

<comment><USER11> > have never heard of RHEL

But surely you've heard of Red Hat itself? In the early 2000s, Red Hat Linux broke into a couple directions: "Fedora Linux" as the community version of the OS, and "Red Hat Enterprise Linux" as the supported, enterprise-level version of the OS (and CentOS as the community-supported version of RHEL).

</comment></comment></comment></comment></comment></comment><comment><USER12> Ultibo - the barebone unikernel OS for Raspberry Pi - is written completelly in Object Pascal... it's source code is >>much<< easier to read than C counterparts (see [https://ultibo.org](https://ultibo.org)).

<comment><USER13> This is strange and wonderful. Thanks for sharing. Somehow I wasn't aware of this, and I follow Raspberry Pi stuff.

<comment><USER14> Too wonderful. I was shocked when I see common filesystem drivers (including NTFS!), completely written in Pascal. The author must be a programming God.

</comment></comment></comment><comment><USER15> I've lately been trying out FreePascal for building my indie games (which have in the past been in C, Python, Java, Objective-C, and finally JavaScript), and it's going well enough. There's certainly room for improvement, and the Lazarus IDE is not at all to my taste, but it's likely to be my next-ten-years language.

[https://mdhughes.tech/2017/09/02/pascal/](https://mdhughes.tech/2017/09/02/pascal/)

and a couple of followup posts

[https://mdhughes.tech/category/pascal/](https://mdhughes.tech/category/pascal/)

<comment><USER16> Any early feedback on mobile?

<comment><USER14> Lazarus and/or Free Pascal? Android is looking good, though maybe not really a pleasing experience for those with less experience. It even has multiple approaches. iOS is still dark, no one seems interested in making it work, even Arduino gets its place before iOS.

Delphi? Some big mobile apps are written in it already. WPS Office for Android and/iOS, if you ever heard, was written in Delphi. At least the last time I decompile their APK it confirms a Delphi runtime existence. Disadvantage would be the framework that's not native, thus you may end up in jumbo size APK even for a form + label containing hello world.

</comment></comment></comment><comment><USER17> How do users of languages like Pascal get by without any/many libraries? Do they need to use the FFI to call out to C functions constantly?

I mean, I certainly buy that $VINTAGE_LANGUAGE could still be great to develop in, but I'm curious the practicalities of working on modern systems without re-inventing every single wheel.

<comment><AUTHOR> In my experience (talking FreePascal/Lazarus here, as I'm on Linux most of the time), the library situation is not _that_ bad, actually. The standard lib has most of the mundane stuff, and a little github-searching can often find a working version of more specific stuff (like SSH2 which I needed recently).

To the contrary, in some areas (like GUI tooling) it is far far beyond newer alternatives like Go.

Also, I think the higher level of the language than C/C++ etc can make it easier to develop your own solution, should you have to.

<comment><USER18> We needed a app for branding. That login to a website. So it needed to do a POST request. I struggled with fp and google for 30 min, and dropped to the `RunCommand('curl',['[https://ifconfig.co'](https://ifconfig.co')],s, opt)` clutch with curl.exe(with licence file) bundled into my innosetup file... magic?!

<comment><USER19> libcurl (with examples) is bundled in the FreePascal distribution, as well as simpler alternatives like fphttp, fphttpclient, fphttpwebclient, etc.

<comment><USER18> Thanks will look into it.

It is hard to get the boss to allow you to write a mvp in non mainstream language.

So I had a quick swing at the libs and wondered about so/dll dependancies compiled against my exe; and just went for a bundled exe, yum and apt curl install script... under a day native win and ubuntu support?!:D I'm sure there is a TODO tag above my command for the junior that is going to hate me because he now needs to code in lazarus... ;)

</comment></comment></comment></comment></comment><comment><USER20> Turbo Pascal and Forth were my first languages past Assembly on C64. They were so much better then Basic and Assembly for a young teenagers.

Delphi is now $1,200 to $4,400 a user!!! WOW more then the $75 in 1983

[https://www.embarcadero.com/app-development-tools- store/delp...](https://www.embarcadero.com/app-development-tools-store/delphi)

<comment><USER21> Currently I'm learning Forth and I really like that language! It's a brain twist and that's reason enough to have a look at :-)

<comment><USER22> I've never done anything serious in Forth, but I was first exposed to it in the late 80s, and keep coming back to it.

Over the past couple of years I've written, and thrown away, several implementations of Forth in C, C++, and Perl. I've even had it running, embedded, on ESP8266 devices.

It continues to be something I enjoy toying with, but equally something I can't find a _perfect_ use for.

<comment><USER20> Give it a try in Racket. Racket's macros is a dream to create another language in.

</comment></comment></comment></comment><comment> V-2 _" You can also define your own types"_, _" classes can also inherit other classes"_, _" Pascal is modular"_...

Not to say these are not valid reasons, or expectations one may have from a language, but - what exactly is Pascal being compared to? I mean, it's 2017.

<comment><USER15> C has no classes, and everything's in one global namespace.

Scheme & LISP have no built-in classes, and one can argue that CLOS isn't what we normally describe as OOP. Both normally have a global namespace.

Inheritance in JavaScript is possible but very hard to implement correctly before ES6. Node has namespaces (sort of) but client-side JavaScript generally doesn't.

PHP in theory has namespaces, but the standard libraries are just dumped in global.

<comment><USER23> > PHP in theory has namespaces, but the standard libraries are just dumped in > global.

Modern PHP development almost exclusively uses Composer libraries rather than the standard libraries, which overwhelmingly use namespaces in Vendor\Project format.

There's going to be a push to clean up the standard library in the coming years. The plan is to introduce a namespaced alternative to the standard library in the global namespace which also cleans up a lot of nits (e.g. phpsadness.com posts). Maybe in PHP 8? Then when the ecosystem catches up, we can discuss deprecating/removing the "just dumped in global" way of doing things in PHP 9.

Source: I'm very likely going to be the main person driving this push.

<comment><USER15> Namespaces by 2020? That'd be nice. The \ syntax still makes my eyes bleed a bit, when most others use . or :

<comment><USER23> You might want to go see a doctor and get that checked out then.

Just because "most others use . or :" doesn't mean it's the only correct syntax in the realm of possibility.

</comment></comment></comment></comment></comment><comment><USER24> My dad still runs his business on a software I wrote in 1998 in Delphi. I haven't touched it since then but it is the only code I have that still works 19 years later.

<comment><USER25> Does it runs on modern Windows or is it running on a VM?

<comment><USER26> It could very well work without VM. Current Windows is binary compatible with old programs.

There are a few reasons that programs stop working and most of them are related to hardcoded directories that got perm. restrictions over the years.

</comment></comment></comment><comment><USER27> The Nim language [0] feels very inspired by Pascal while looking like Python. If you're interested in fast, compiled & typed languages, I suggest you also take a look at it. I personally love its readability.

[0]: [https://nim-lang.org/](https://nim-lang.org/)

<comment><USER13> I'm curious what's similar to pascal about it? It's garbage collected, it compiles to C or JavaScript, and its syntax is inspired by Python, so I just wonder what is left.

<comment><USER28> From [https://nim-lang.org/features.html](https://nim-lang.org/features.html):

> Oberon-inspired visibility markers

> Pascal-inspired type sections for leaner definitions

While Oberon isn't Pascal, they're both Wirth languages that share many commonalities.

</comment></comment></comment><comment><USER29> I used Delphi (1) to Delphi 5 in the 90's and used Delphi at a company for production software from 1998-2001. I loved it. It was (?) a great language and was always a pleasure to work in. I'm not a language fundamentalist (I use whatever it takes to get the job done and whatever my employer prefers), but I can say that at least 16 years ago it was a joy to work in.

</comment><comment><USER30> Some fun I had with free pascal in college was that you can $DEFINE almost anything to almost anything else:

      {$DEFINE (:=ab}
      {$DEFINE ):=ba}
      ...etc...

Code becomes pretty ridiculous:

      WriteLn ab ab a + b ba * c ba

If you define WriteLn, +, and * as other things too you can get horrific looking code. All keywords like program, if, then, and end can be redefined. I wrote a script that would take a regular source file and output a functionally identical file which looked like:

      {$DEFINE program:=a}
      ... many more defines ...
      {$DEFINE [:=zd}
      {$DEFINE ]:=ze}
      a b c d e f g h (* ... the entire program on one obfuscated line *)

<comment><USER31> Wow, using pascal for 30 years and diddnt know this..

I am actually thankful its not that well known. Pascal is still readable where as #defines in C libraries give me terrible headaches decoding.

</comment></comment><comment><USER32> Yeah I've written compilers for Swift, C#, Java, JavaScript and Pascal and agree Pascal is the cleanest and nicest language, both on the parsing side and writing in.

<comment><USER33> Pascal language has a LL(1) grammar, typical for Wirth and other 1980s work.

LL(1) grammars are of great practical interest, as parsers for these grammars are easy to construct, and many computer languages are designed to be LL(1) for this reason.

<comment><USER32> I always hand write them but yeah. LL(1) is always nice

</comment></comment></comment><comment><USER16> I believe the toolchain offers the best cross-platform GUI option right now. In the best case this can serve as a wake-up call to other languages: get your GUI house in order!

<comment><USER34> Everyone is (sadly) switching to Electron for this purpose.

</comment></comment><comment><USER18> While the author mentions castle-engine at the end I also want to mention glscene[0]. Don't think it is actively maintained like castle. But boy was it amazing to read through the code to learn OOP principles and GL.

[0]: [http://wiki.lazarus.freepascal.org/GLScene](http://wiki.lazarus.freepascal.org/GLScene)

</comment><comment><USER24> Apollo Computer used Pascal as the systems programming language for its operating systems beginning in 1980. Variants of Pascal have also frequently been used for everything from research projects to PC games and embedded systems.

[https://en.wikipedia.org/wiki/Pascal_(programming_language)](https://en.wikipedia.org/wiki/Pascal_\(programming_language\))

</comment><comment><USER35> Folks interested in Object Pascal might also be interested in [http://www.elementscompiler.com/elements/oxygene/](http://www.elementscompiler.com/elements/oxygene/) (no affiliation, but as an observer it seems relevant and interesting).

<comment><USER32> I am obviously biased, thanks for mentioning it :)

</comment></comment><comment><USER36> What caused pascal to lose out to C? Seems like it was a good language that had developer uptake.

<comment><USER37> 1) The popularity of UNIX where C was the standard language 2) The fact that, much like BASIC, most implementations of the language didn't follow the standard. In practice, Turbo Pascal was more of a standard than the official one.

<comment><USER38> It was more than just the popularity of Unix.

A while back, I ended up following a link on HN and reading a bunch of old computer magazines. I came across an article by Peter Norton (in PC Magazine) from around 1986 or 87. In it, he discussed why C was rapidly displacing Pascal among DOS programmers.

Not that Unix didn't have an effect, but as DOS and then windows exploded in popularity in the 80s, C displacing Pascal there played a big role in Pascal's overall decline vs C.

edit: I think this is the article I'm thinking of:

[https://books.google.ca/books?id=NZrPkWywRXgC&pg=PA75&lpg=PA...](https://books.google.ca/books?id=NZrPkWywRXgC&pg=PA75&lpg=PA75#v=onepage&q&f=false)

<comment><USER39> In those days without Internet and expensive dial-up access to BBS limited to 5 simultaneous users, it depended very much where in the globe we are talking about.

On my area in Portugal, using C was mostly for university projects.

For anything else we were using Turbo Pascal and Assembly, with Clipper for business applications.

Actually many MS-DOS systems programming books had code listings in C, Pascal and Assembly.

<comment><USER38> A BBS with 5 simultaneous users? Sounds amazing. Most of the BBSes here in the Toronto area only had a single phone line. :)

<comment><USER39> Yep, at least they had 5 different numbers, but given the price of regional phone calls, I only used it a couple of times during a Summer job.

</comment></comment></comment></comment></comment></comment><comment><USER39> I loved Turbo Pascal and Delphi, which is why I having Java and .NET compile into bytecode always felt a bit of deception.

<comment><USER32> What makes bytecode a deception though?

<comment><USER39> If Java and .NET produced executables like C and C++, there would be less need for them.

Instead, one is forced to deliver the VM with the application or buy a third party AOT compiler like Excelsior JET, while depending on another language for implementation.

This made everyone that cared about writing native executables focus on C and C++, with the respective increase in unsafe code.

This is finally changing thanks to D, Go, Swift, Rust, but slowly.

So we have .NET Native on UWP, Xamarin on iOS and Android and IL2CPP on Unity.

Java now started a long road that will take several years until Project Metropolis will finally deliver some kind of results.

<comment><USER17> > This is finally changing thanks to D, Go, Swift, Rust, but slowly.

This whole thread has me imagining what it would be like if all the energy that went into Go/D/etc had gone into Free Pascal instead.

Imagine if Free Pascal had a swanky website, and an army of people blogging about this hip, powerful language, all the kids are getting on board, I heard Netflix are re-writing their routing layer in Object Pascal, have you seen the benchmarks for this awesome new non-blocking Pascal web server...

<comment><USER39> I did enjoy Pascal a lot, but right now it lost the PR battle.

Its spirit leaves on in languages like Rust, Swift, Kotlin and similar.

It is easier to drive adoption to those languages, than try to convince younger devs to use Pascal, even with a swanky site.

I like your idea, though.

</comment></comment></comment></comment></comment><comment><USER40> How are the available packages? Is there a package management system ala `bundler` or `npm`?

This to me is a critical piece of adopting a language, especially a non- mainstream one. Pascal has the benefit of being older but access to clean modern libraries is critical.

Pascal looks like an excellent option for building cross-platform desktop apps, given the excellent GUI libraries. But I doubt I'm sold enough on it for any web stuff, given the great other options. I'd likely use OCaml if I was going to gamble on a non-mainstream language.

<comment><USER41> This is a pretty critical piece for me as well. I've done some googling and I can't find anything definitive.

<comment><USER21> Lazarus has a concept of packages for years. There is a newly created package manager to handle updates and dependencies as well: [http://wiki.freepascal.org/Online_Package_Manager](http://wiki.freepascal.org/Online_Package_Manager)

But I don't think that it is comparable to gem/npm or whatever yet...

</comment></comment></comment><comment><USER42> All of the arguments given for Object Pascal in this article could apply to other languages.

A better question might be "why use Object Pascal over Language X"?

I could see a niche in cross-platform desktop development, assuming you didn't want to go the Electron route (and there's valid reasons for doing so). I've worked in Qt quite a bit in my desktop days and Qt/C++ is quite complex.

Object Pascal still has manual memory management though, IIRC, which is a large portion of that complexity.

<comment><USER43> Yeah, I don't have the sense from reading this that I have any idea why I'd prefer Pascal over, say, Java, or C#, unless I liked begin and end blocks more than braces and felt really strongly about it.

</comment></comment><comment><USER44> I loved Turbo Pascal back in the day, thought it was better than C when I was working with DOS. I switched to C when I started working on Unix workstations.

</comment><comment><USER45> I just what to thank the author of the article. I am from the camp of those who had this misunderstanding of thinking that Pascal is only a "toy language" to be studied at school or university and the articles gave clear proofs it's not. I'm not going to switch to Pascal now or explore the question more deeply; it was just an important thing for me to learn.

<comment><USER21> Thank you, this really encourages me after all that discussion! :-)

</comment></comment><comment><USER46> I wrote the first version of Outlook Profiler in Delphi 6, then in Delphi 7. Wonderful introductory language for making products (although Perl was my first exposure). The VCL GUI library and IDE work so well together that things today are second rate. Strange that we've not improved this basic need.

Today, I write most things in C++ (or C# if I can).

<comment><USER47> I always felt it's really strange that making a quick and dirty GUI application is still easier with Visual Basic 4.0 (circa 1995) than with most any modern tool.

<comment><USER48> I'd like to see what you think of [https://anvil.works](https://anvil.works)

It's deliberately built in the Delphi/Visual Basic tradition, and trying to carry those virtues onto the modern web.

<comment><USER47> interesting, thanks for the tip!

</comment></comment></comment></comment><comment><USER49> I've tried picking up Free Pascal and, for me, the documentation is lacking. I come from C# where Microsoft has amazing documentation and small examples on how to use just about every single class in the .NET framework. I guess I'm just spoiled with the documentation I have had and need to get used to it.

<comment><USER21> Did you have a look at [https://www.freepascal.org/docs.var](https://www.freepascal.org/docs.var) and especially at the RTL [https://www.freepascal.org/docs- html/current/rtl/index.html](https://www.freepascal.org/docs- html/current/rtl/index.html) and FCL [https://www.freepascal.org/docs- html/current/fcl/index.html](https://www.freepascal.org/docs- html/current/fcl/index.html) documentation? I think the Free Pascal team has done a good job documenting nearly everything!

<comment><USER49> Wow, not sure how I missed that. I was just looking at their Wiki and then there was a page where they had the language spec. This changes a lot. Thanks for bringing this to my attention.

<comment><USER39> The old Borland manuals are on bitkeepers.

They are quite good.

</comment></comment></comment></comment><comment><USER50> The default setup for the industrial control systems I've had to work on is Windows2000 with Delphi applications.

There are a shocking number of these systems still in use today.

I've come to have a grudging admiration for these clunky old things and a special respect for pascal in its many forms.

</comment><comment><USER51> In my university (in Paris) we used to learn programming that way for the licence degree

1st year -> pascal only

2nd year -> c only

3d year -> java only

That was a very nice learning curve for the core course of programming.

<comment><USER52> For absolute beginners, I still think Pascal, or Turbo Pascal is best to start. It has a syntax that doesn't scare people away, and very readable. Deploying is also 1 trillion times easier then what ever we have today, ( C , Python , Ruby , Node.js ... )

I would have picked Ruby if it could compiled into a single executable file, and if the Dev environment actually work on Windows.

P.S: It does work on Windows, but not as simple and easy as it should be. Compared to every other alternative on the market.

<comment><USER53> > Deploying is also 1 trillion times easier then what ever we have today, ( C > , Python , Ruby , Node.js ... )

What makes it easier?

Distributing an executable from C seems easy. And using package managers from others also seems easy.

<comment><USER31> Press F9 and you get a self contained exe which was not dependent on any libraries in about a second.. I think that was what the poster was getting at.

</comment></comment></comment></comment><comment><USER54> Pascal and C are very close to each other as they implement the same programming paradigms. Haven't tried Object Pascal but I assume it extends Pascal with OOP and some other stuff... while still being the same imperative/structured/object oriented combination we all know.

If you are coming from C, it should be like moving from Python to Ruby, or Java to C# or viceversa... same paradigms for the most part.

</comment><comment><USER55> Anyone here used PascalScript[0], specifically with compiled Pascal itself? I am planning an application that is compiled and delivered with PascalScript to allow the end user to extend and customise the application without access to the source code. Preferrably using FreePascal.

[0][http://www.remobjects.com/ps.aspx](http://www.remobjects.com/ps.aspx)

</comment><comment><USER56> Anyone who likes Pascal should check out Nim. Inspired by Pascal, with some Python-like syntax (and significant whitespace), as well as some really cool features from other languages. Also compiles to blazing fast binaries via C or C++ (JavaScript too but not sure about the performance there).

</comment><comment><USER57> Most of the points are all well and good (albeit underwhelming) but

>This is maybe the fact, that most developers are annoyed about: the absence of braces and the very verbose syntax of the language. As an example, instead of opening and closing braces, Pascal uses the begin and end keywords for blocks. The if keyword is complemented by the word then. As you can see, the whole syntax is readable like plain English. If you start to cry now, you should consider one important question by yourself: What is more important? The ability to have a short syntax to write code fast or the possibility to read and understand code that was written by other developers or even by you a year ago? I'm in favour of the second fact and I really enjoy that verboseness.

You don't make code more readable by adding more noise.

BEGIN and END is just plain noise

BEGIN And how exactly does this make code "readable like plain English?" END

<comment><USER58> English is great but for all the "noise". Why is "the" a three letter word and not something more concise like "le" or "a"? Why is it "and" and not a single- letter "y" like any sensible language?

You get used to the syntax, and after a while it becomes invisible.

</comment></comment><comment><USER59> I know C# borrowed heavily from Pascal. (So much that a lot of its improvements over Java were overlooked.)

What's the advantage of using Pascal over C# or Java? Is it that Pascal outputs true compiled programs instead of requiring a VM?

<comment><USER60> Makes sense since Anders H. architected c#, turbo pascal, and Delphi. As soon as he left Borland, Delphi began to atrophy. Too bad because it was a ground breaking product when it came out.

</comment></comment><comment><USER18> Something I wonder how will one get object pascal work? The worst part is I would like to be picky and only to fpc/lazarus dev, no delphi. Otherwise I need to stick to selling my python/flask, html5 fizz buzz.

</comment><comment><USER61> Weird anyone still uses this, I first saw Object Pascal on a Apple Lisa in 1983.

<comment><USER62> FWIW Apple's Object Pascal and modern Object Pascal have little common.

Although i think Free Pascal does have a Mac Pascal mode so that it can understand Apple's Object Pascal dialect.

<comment><USER49> From what I've read Object Pascal is just another name for Delphi but without the trademark hassle.

<comment><USER18> No need to speculate[0]. The name "object pascal" was firstly used by apple for their dialect of pascal. Then Borland came and evolved Turbo Pascal into Object Pascal(and brand it Delphi) and then fpc came and branded them a open source object pascal implementation.

As for Pascal vs Object Pascal, Procedural vs OOP, Think C vs C++(not that I'm saying c++ is better).

[0]: [https://en.wikipedia.org/wiki/Object_Pascal](https://en.wikipedia.org/wiki/Object_Pascal)

<comment><USER49> From the wikipedia article:

"Borland used the name Object Pascal for the programming language in the first versions of Delphi, but later renamed it to the Delphi programming language. However, compilers that claim to be compatible with Object Pascal are often trying to be compatible with Delphi source code.[citation needed] Because Delphi is trademarked, compatible compilers continued using the name Object Pascal"

You're still right that Object Pascal can encompass more than just Delphi.

</comment></comment></comment></comment></comment><comment><USER63> My first language in high school was actually Pascal (as in - Delphi) but now I love C, C++, Lua and Python and barely can write Pascal at all, especially since it's so separate from the C inspired syntaxes and semantics. For job reasons I'll also probably learn something 'proper', mainstream, industrial, etc., but not relearn Pascal. But for trolling, having fun or some private GUI work (especially that, thanks to Lazarus) it's just great.

When I got to university they (the university, not the high school, no idea about them) dropped it from the curriculum so my Pascal skill makes me quite unique in that sense.

I only used it once or so during university to troll one doctor leading a class, an old homework grading system still had Pascal available in it in addition to C and C++ so I submitted a Pascal program. In a twist of irony the next class after that assignment was led by another person, a really smart professor who usually teaches in Warsaw who also happened to be quite a good sport about jokes and such, who quickly sarcastically remarked to my Pascal program: we've got a _connaisseur_ in here.

And this whole joke was actually in response to story the person usually leading that class told, about how once during a competitive coding competition (allowing C, C++ and Pascal) where everyone was using C or C++ he was first to submit a correct program and it was in Pascal to which the live judges commented that Pascal is making a grand return, since even back then it was on its way out.

Recently I picked it up again when I needed to do something quite graphical for statistics class on a short notice that would be dealing with graphs and I didn't want to fight Qt, GTK+, HTML5 or whatever into submission and having recently discovered Lazarus I knew it can do it. I quickly whipped up the program, the graphing components were great with API and all but were poorly documented (or not at all). Sadly there were no funny comments from the doctor on that one.

Part of using Pascal for anything at all or even knowing it is actually the funny comments and reactions of others. Some people seem to think Pascal is properly dead, as in - no longer usable, no longer worked on, no longer coded in, at all. Like COBOL or something but with no 'old bank software' and such to save it. When looking for a job I actually even forgot to put Pascal on my CV as being one of my 'very weak' skills but I imagine it didn't hurt my chances... I even share the first name with Blaise Pascal (the French mathematician the language was named for) so that makes my use of Pascal even more appropriate and allows for even more jokes.

After that I also did few UVA[0] tasks but sadly Pascal seems to be broken for many tasks so I gave up (I get an error saying 'mv failed: program.pas and program.pas are the same file').

Later, to not waste and forget what I relearned for the graph program homework and since GUI in Lazarus is so easy to do, I also (shameless plug) wrote a notes program[1] for myself and it was a breeze thanks to Lazarus and the LCL components. Now I use that program daily for my various notes, todos, etc.

[0] [http://uva.onlinejudge.org/](http://uva.onlinejudge.org/)

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

</comment><comment><USER64> A huge chunk of my career has been programming in Turbo Pascal and Borland Pascal for Windows. I miss those days!

</comment><comment><USER65> THINK Pascal

</comment><comment><USER66> Re: Because I can't learn any other language

</comment><comment><USER67> To my limited experience, everything Pascal had of its own is unusable. Everything usable in the language comes imported from C.

However I can see how one would prefer Object Pascal over C++.

</comment><comment><USER68> Hopefully, it has changed but, when I was learning Pascal many years ago, an entire program had to be contained within a single file. No separate compilation files and no linker. For all but toy programs, this made for some very long files which, given the state of editors then, made maintenance a real problem.

<comment><USER69> UCSD Pascal had separate compilation units (late 1970s). A lot of people from my generation got started with Turbo Pascal and it had units based on UCSD Pascal starting in TP 4.

<comment><USER70> OMFG this brings back memories, like the promise of a processor that executed p-code. Good times.</comment></comment></comment>


Comcast Data Breach Leaks Thousands of Unlisted Phone Numbers - <AUTHOR> https://www.eff.org/deeplinks/2014/08/comcast-data-breach-leaks-thousands-unlisted-phone-numbers-threatening-customers

<comment><USER2> ... and Comcast didn't care a whit. After all the customers paid them to protect the information, and they already had the money, and the customers have no where else to go anyway since its mostly a monopoly. Pay some small fine, move on, maybe you can upsell them on even more protection and make it up anyway. This sure makes me want to support Comcast becoming a national monopoly.

</comment><comment><USER3> People have to PAY to have an unlisted number? That seems like a very strange concept to me.

<comment><USER4> Yes but there is a way around the problem -- you can list your number under the previous owner's name. Then whenever you get a phone call asking for <Previous Owner's Name> you know you can immediately hang up.

I agree it's not quite a perfect substitute, but it works fairly well.

</comment></comment><comment><USER5> Another reason to just go with a mobile phone. There are no listings for those numbers that I am aware of.

<comment><USER6> There's still a database of customer names and billing/contact information. That could easily be breached as well.</comment></comment>


Shared Libraries: Understanding Dynamic Loading - <AUTHOR> https://amir.rachum.com/blog/2016/09/17/shared-libraries/ <comment><USER2> Copying the cheat sheet over for reference:

Find out what dependencies are missing with ldd <executable>. If you don't identify them, you can check if they are direct dependencies by running readelf -d <executable> | grep NEEDED. Make sure the dependencies actually exist. Maybe you forgot to compile them or move them to a libs directory? Find out where dependencies are searched by using LD_DEBUG=libs ldd <executable>. If you need to add a directory to the search: Ad-hoc: add the directory to the LD_LIBRARY_PATH environment variable. Baked in the file: add the directory to the executable or shared library's rpath or runpath by passing -Wl,-rpath,<dir> (for rpath) or -Wl,--enable-new-dtags,-rpath,<dir> (for runpath). Use $ORIGIN for paths relative to the executable. If ldd shows that no dependencies are missing, see if your application has elevated privileges. If so, ldd might lie. See security concerns above.</comment>


Constantly Confusing 'const' - <AUTHOR> http://blog.getify.com/constantly-confusing-const/ <comment><USER2> I don't agree with this style.

`var` is broken. Don't try to find a use-case for it. Just don't use it.

It would be nicer to have real, deep immutability, but `const` isn't it. Therefore, use it for what it actually is, not what you wish it was. If you don't intend to reassign a reference, then mark the reference constant. That's it.

It may be surprising, but it's quite easy to write JS where almost every declaration is `const`. When every mundane variable is `const`, then the more complex initializations/data flows/accumulators really requiring `let` stand out, which is very useful for reviewing code ("let" = "warning: there may be an `else` or missing `switch` case that will leave that undefined").

Because `const` requires to be initialized at the time of definition, you know the variable is valid for its entire lifetime. When you find its value was wrong, there's only one place where the value could have come from (you don't need to comb the function to look for reassignments).

<comment><AUTHOR> > `var` is broken

Nonsense. Revisionism at its finest.

But that's an argument I made in a different blog post: [http://davidwalsh.name/for-and-against-let](http://davidwalsh.name/for-and- against-let)

> It would be nicer to have real, deep immutability, but `const` isn't it.

Yep, agree with you on that. That was one of the main points of my post.

> Because `const` requires to be initialized at the time of definition, you > know the variable is valid for its entire lifetime.

No, that's where you're mistaken. All you really know is that the variable __assignment __is reliable. If the assignment happens to be of an immutable value, great.

But given the choice between these two guarantees:

1\. The assignment is immutable

2\. The value is immutable

(1) is almost pointless -- and a quick scan of your small block where it's scoped will verify that or not.

(2) is the absolute important one.

`const` masquerades as (2) when it's really only (1). That's what I don't like about it.

<comment><USER3> Your blog post doesn't make a very strong argument, honestly.

<comment><AUTHOR> I would genuinely (no sarcasm) like to read a blog post that makes a stronger argument (in either direction) than mine. Most blog posts I've read about `const` cite very flimsy things like "it makes my code more readable" without any real meat as to why that's true. I tried to debunk that with careful thought. If someone has more convincing arguments besides subjective opinion, I'd love to read them.

<comment><USER4> >I tried to debunk that with careful thought.

Well you didn't really succeed. Your argument against using const comes down to "someone might violate expectations or remove the word const, so let's not even try". I don't agree with that.

Traditional constants are used to show that nothing changes in large swaths of code; showing how much benefit you get in a standalone 12 line function is not meaningful.

Also, calling function scoping bad is not revisionism. That is not a new idea, and does not depend on 'let' existing.

Edit: And the the article you linked about let is saying so many ridiculous things I won't even try to respond to it, but jeez. 'implicit'

<comment><AUTHOR> > Your argument against using const comes down to ...

You did an absolutely horrible job of summarizing even remotely what my argument was, so I guess "I won't even try to respond to" this, since you either can't critically read or didn't care to this time. jeez.

<comment><USER4> That's what you devote several paragraphs to. I'm not sure how else you explain quotes like "the likelihood is that a developer who needs to change a variable and gets a const-thrown error about it will probably just change the const to let and go on about their business."

I don't care to argue about 'let' because this is a post about 'const'. I was writing a rebuttal in the previous comment but realized it was way too off- topic. But your definition and reasoning for "implicit scope" hurts me to read.

</comment></comment></comment></comment></comment></comment></comment><comment><USER5> Why not use `const` as default? I would argue that using `let` instead is a premature optimization of readability.

It's easier to reason about a variable if you know it will always be one value—even if the value may be mutated (which is unfortunate).

`const` is a simpler construct. It has less rules and I would always suggest that using `let` will introduce complexity that only needs to be there when you can identify a genuine need to re-assign a value to your variable.

That said, I enjoyed the post. It's a good read!

<comment><AUTHOR> > Why not use `const` as default?

The argument I made toward the end of the post is that refactoring from `const` back to `let` is more risky than the other way around.

Moreover, surveying my own code, honestly, the vast majority of my declarations should be `var` or `let`, and only a much smaller amount being `const`. I think a lot of people are rushing blindly to `const` without realizing its full behavior.

> [`const`] has less rules ... using `let` will introduce complexity

I think this is completely backwards. `let` has no special caveats (other than the TDZ thing, which they both have), whereas `const` has this caveat that it's only about assignment bindings and not about values.

Imagine a piece of code that has `const x = 2` that you later refactor to `const x = [2]`. The complexity is, you now have to contend with the `[2]` being a mutable value where `2` wasn't, and `const` sorta pretends to keep you safe but doesn't.

That's the complexity I disfavor.

<comment><USER6> _`const` has this caveat that it 's only about assignment bindings and not about values._

 _Imagine a piece of code that has `const x = 2` that you later refactor to `const x = [2]`. The complexity is, you now have to contend with the `[2]` being a mutable value where `2` wasn 't, and `const` sorta pretends to keep you safe but doesn't._

If these semantics aren't instantly obvious to you, then that's emblematic of a serious gap in your understanding of programming. I say this not with the intent of shaming, but to recommend that you (and the very many other people with the same lapse) invest some time into developing intuition about reference semantics. The best way IMO is to get initmately familiar with a language that has first class pointers or otherwise explicit indirection. Learn C, get good at C, write something big in C. Focus on the pointer semantics and you'll come out a significantly better programmer in languages where pointers are slightly less immediately visible.

Of course if you're making this recommendation because you work with other people who have a lapse in their understanding of references I can understand that. I would encourage you, however, to try to fix the problem rather than work around it by stunting the language. After all, it's an issue that will crop up everywhere, not just the semantics of `const'.

<comment><AUTHOR> Oh, I see. I just need to learn more. The problem is I just don't know JS (or other langs for that matter).

[http://YouDontKnowJS.com](http://YouDontKnowJS.com)

<comment><USER7> I agree that saying this issue is "emblematic of a serious gap in your understanding of programming" is.. well.. douchebaggery.

However I feel a lot of the article and many of your posts about it in here come down to "it makes me feel uncomfortable" which.. I mean, ok. Sure. I hate spaces for indentation and think double quotes are better (and I have reasons for both)... but I don't say there's no use to the other options.

I feel you're throwing the baby out with the bathwater here.

 _Should_ const probably have been about value immutability too? Yes, I think so. I _totally_ agree. That's a REALLY important topic to discuss. Maybe pitch it to the ES2016 committee as an iterative upgrade to const?

But as it stands it _does have value_. Yes it _mostly_ just codifies what programmers original did as a language construct but it does also stop redefinitions which was an annoyingly common issue. So it's progress. Small, incremental, and not as full-featured as we'd both like... but it's progress.

Drawing attention to the issues with const is important... but there's no reason to rail so hard against its _usage_ when it's understood to have those limitations... is there?

<comment><AUTHOR> But my post did actually conclude the cases where it's useful. It seems like a lot of people here only read the first half of the post and stopped.

I don't think `const` should be removed. I just don't think we should lead with it. I'm not sure why that's not coming across except for the fact that the post isn't being read.

<comment><USER7> Hmmm I think maybe your tone comes across stronger than you mean it then.

Because, while you do say that, it comes across as a sort of "meh, it's not totally useless but I still hate it" kind of thing at the end.

Especially as you spent the last... like 2000 words trashing it.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> const conveys additional information. It says "this name will not be rebound," not just to the reader, but to the machine interpreting this as well.

As a reader, I know that after reading a const line I don't have to check if someone rebinds this name before each use site -- it's impossible.

Interpreters and static analysis tools use this information to stop you when you write a piece of code that rebinds the name, asking "did you really mean to do that? You said you wouldn't."

<comment><AUTHOR> > I know that after reading a const line I don't have to check if someone > rebinds this name before each use site -- it's impossible.

This turns out to be almost useless information for most of us, since the real problem is not re-assignment, but mutation of the value (in the case of non- primitives).

`const x = 2` feels great emotionally, but `const x = [2]` has the feeling of safety without any of the guarantee.

This is a classic case (quoted from Crockford regularly) of a utility that it sometimes useful and sometimes harmful (aka not useful), and there's a better option (`let`), so the better option should generally be preferred.

I only use `const` (refactor from `let`) when a piece of code is reasonably complete and I'm pretty sure re-assignment will not ever be appropriate. Guessing at that before writing the code is a premature optimization.

And guessing wrongly and having to refactor back to `let` later is more risky.

<comment><USER9> > `const x = 2` feels great emotionally, but `const x = [2]` has the feeling > of safety without any of the guarantee.

Const is perfectly sensible with references to mutable objects too. The latter guarantees that x will always point to the same mutable array. If you pass a reference to the x array to a function which needs to mutate that specific array or observe it for changes, then it may be important that x is never rebound to a different array. Consider the following code:

        const x = [5,6,7];

        Object.observe(x, function(changes) {
          console.log('changes', changes);
        });

        // ...
        // time to clear the array

        // WRONG! The code observing changes to the old x array will not see
        // this change or future changes to this new array. Because we used const, this
        // will trigger an error and immediately show us our mistake.
        x = [];

        // CORRECT. This mutates the array instead of creating a new empty array.
        x.length = 0;

<comment><AUTHOR> > If you pass a reference to the x array to a function

This notion (concern) is meaningless in JS, since when you pass any reference, it's always a reference-copy, so there's no value nor assistance that `const` provides.

<comment><USER9> Const usage prevents a bug in my example directly above!

</comment></comment></comment></comment></comment><comment><USER10> To be honest, I've been following the rule of using capital letters for things that should remain 'constant'. If everyone working on the project knows that, it works like a charm, never had any issues with it. But it's nice to have const now. So, I do see value in the const feature even if it doesn't protect me against a commit by the devil himself who changes the content of const objects.

Long story short: If you want to be annoyed about this feature, then more power to you. I won't be.

</comment><comment><USER11> > I think the likelihood is that a developer who needs to change a variable > and gets a const-thrown error about it will probably just change the const > to let and go on about their business.

If this is the core argument to not using 'const', then you are out of luck trying to enforce any coding style. I might as well just delete any code that doesn't make sense.

<comment><AUTHOR> It's not the core argument. It was a tangential side note in the blog post.

</comment></comment><comment><USER12> One advantage const can bring (at least when used with primitives or frozen values) can come from JS IDEs: if they detect a value is const, they can report its value when hovering the variable name, in a static way.

That's what Java IDEs do with static final variables.

</comment><comment><USER13> > To most developers, it means that your LUCKY_NUMBERS will always be 12, 19, > and 42.

Is that really true? I would assume the opposite. Most developers have used Java or C# or any of the other languages that have similar reference semantics. I would agree if you qualified that with "beginner".

<comment><USER14> I suspect if you did a survey, there would be plenty of programmers who would reply "it works like this, except these languages do something different", because "const means immutability" feels "right" despite many mainstay languages doing it differently.

</comment></comment><comment><USER15> And people complain const in C is too complicated...

<comment><USER16> How do you mean? All this post is saying is that "const" in JavaScript is the same as "final" in Java—it lets you make immutable references, but not immutable objects. In C terms, you can express this:

        T *const x = ...;  // Immutable pointer to mutable T.

But not this:

        T const *x = ...;  // Mutable pointer to immutable T.

Even so, I don't agree with the author's argument that "const" is to be avoided. It does offer some protection against minor errors, which is not nothing.

<comment><AUTHOR> I don't think my argument was to avoid `const`. I think my argument was to pick `const` at the end rather than at the beginning. I feel those are different arguments.

<comment><USER16> To be clear, "choose X last" does give the impression of "avoid X", by which I don't mean "don't use X at all". I disagree, but it's a small matter; it's not as if it would bother me to read your code.

</comment></comment></comment></comment><comment><AUTHOR> disclosure: self submission</comment>


Trump tells apple to make iPhone in US - <AUTHOR> https://www.reuters.com/article/us-usa-trade-china-apple/trump-tells-apple-to-make-products-in-u-s-to-avoid-china-tariffs-idUSKCN1LO0SX <comment><USER2> It's so frustratingly hard to convince some people that their world _does not exist in a vacuum_. Even if you _could_ magically move a job to your country/state/county or even your city/neighborhood, it would most likely still depend on work done elsewhere in the world. I just don't know where to start with this viewpoint except to say it is _obviously wrong_ to assume that one country (even a bigger one such as the US) can just handle itself.

</comment><comment><AUTHOR> Supply chain is everything. I have built this for a vendor (USA) in China and moved it to Malaysia (with same manufacturer). The basic issue is parts. They are all in China. It is a simple statement with so many parts behind it. Edit typo

</comment><comment><USER3> Apple used to make computers in the USA. But all the current iPhone parts are not made in the USA. You'd have to import them then assemble them in the USA. Didn't Trump have tarrifs on imports?</comment>


China tightens Web controls; commenters must register real names - <AUTHOR> http://www.latimes.com/world/asia/la-fg-china-web-controls-20150204-story.html <comment><USER2> Before you start thinking "oh, those crazy Chinese...", remember that many people in the USA (and other western countries) fervently believe that we should do the same thing.

<comment><USER3> I think one can think both that the Chinese government is exceptionally repressive and be scared how many people in the West might be willing to follow their lead.

Thankfully, I don't think a real names policy has much chance in the US for the time being.

<comment><USER4> Most Norwegian newspapers enforce a full-name policy in their comments sections. Which is frankly ridiculous; anyone who seriously wants to troll just comes up with a fake name. But it's very worrying that this is taken seriously by people in our own society.

<comment><USER5> Don't know the quality of Norwegian comments on newspapers, but if it's anything like what happens in my country, I can understand them asking for full names. In short, stupid and mean, really mean, YouTube-style. Of course, a full name policy doesn't help. Even when the comments section is powered by Facebook, with most users having real names and being sort of trackable, you still get the same stupid and mean comments, because let's face it, a majority of us on the web are stupid and mean.

I'm really against nation wide policies, but on the other hand here we're talking about web properties. Personally I don't care when those shitty newspapers that I don't even read demanding full names. For one it's their right to do so. And also, as long as this isn't by law, it means that you always have alternatives and that's what competition is about. I mean, really, Reddit has 10 times more users than the population of your country and my country combined.

</comment></comment></comment></comment><comment><USER6> What really bugs me is that this is the same direction a lot of policy makers and even tech companies seem to want to go, all the while decrying the Chinese for the same actions. I hope we don't allow it to progress that far in the US, but we really need to step up to the debate when people start droning on about cybersecurity, trolling, libel, and defamation on the Internet. Perhaps I'm just in the minority that thinks free speech should include the right to offend and we should not allow everyone to get offended at anything they want and get it banned.

Youtube co-founder jawed's first youtube comment: "why the fuck do i need a google+ account to comment on a video?"

<comment><USER7> Note that Google has reversed course and apologized for Real Names policy

</comment></comment><comment><USER8> It is funny how american media is eager to depict China as a North-Korea, and how americans opinions end being formed by their partial media in the same way it happens under dictatorships. Have spent a decade in China, I have yet to see a cop carrying a gun. Cops in China are way more friendly than in US, and for me, way more trustable. people think they keep the chinese people under fear and draconian control, but if you spend some time in China and listen to the people, you see thats not the whole truth. American media call Mugabe a dictator and call Cameroon's President a "chief of state", but both countries hold the same kind of elections. Anyone saw the news about the recent death of the Arabian king? I didn't read any mention about him being a dictator, indeed he is, but he is an ally.

<comment><USER9> I lived in China for 6 months and saw plenty of cops with guns and saw undercover cops roughly throw around a street vendor who had gotten too close to the forbidden city for their liking. Your view here seems to be willfully obscured.

Having your opinion formed by the media is a necessity of living in a world where you can't get first hand information for everything, i.e. a constraint imposed by reality. the difference is that in the west you can choose what media you want to pay attention to, and the media itself is free to report what it wants.

<comment><USER10> If media is free, then why is Glenn Greenwald in Brazil and Laura Poitras in Berlin?

[0] [http://www.dailymail.co.uk/news/article-2797916/filmmaker- di...](http://www.dailymail.co.uk/news/article-2797916/filmmaker-directed-new- film-edward-snowden-avoids-uk-fears-arrest-official-secrets-act.html)

</comment></comment></comment><comment><USER11> I fail to see how this is different from Facebook (and formerly Google+)'s real names policy which will flag unusual names and force you to give a valid Government ID to reactivate your account.

Facebook (along with Twitter) is often the gateway to commenting on a lot of popular sites in the US. Very few people stop and make the alternate account required.

References:

1\. [https://www.facebook.com/help/159096464162185](https://www.facebook.com/help/159096464162185)

2\. [http://boingboing.net/2011/08/27/eric-schmidt-if-you-cant- us...](http://boingboing.net/2011/08/27/eric-schmidt-if-you-cant-use-your- real-name-dont-use-google.html)

<comment><USER2> One is a decision by a private company (which you can get around by using a different service) and one is a mandate from the government.

<comment><USER6> Given both Googles and Facebooks origin funding, I think a debate could be had about this point.

<comment><USER12> Explain what you mean. Where did their funding come from?

There is no US government law or rule to enforce real names (see Twitter, etc).

</comment></comment></comment></comment><comment><USER13> South Korea tried that several years ago. The outcome was (well, apart from gross restriction of freedom of expression) that every small and large websites were legally required to ask for people's personal identifying information and store it somewhere. There were several popular incidents where millions of people's information were hacked, and who knows how many incidents were there that wasn't publicized.

These days it's safe to assume that the name and Residential Registration Number of pretty much every South Korean is floating somewhere in China. (Well, at least the law is gone now...)

Glad that China is following our lead.</sarcasm>

</comment><comment><USER14> Does this apply to Chinese commenters on overseas blogs and forums?

If so, they've just solved a huge chunk of the comment spam problem.

<comment><USER15> If the Chinese government wants to help unmask people?

</comment></comment><comment><USER16> I don't think it will affect much, most of the sites are using qq/weibo/renren openids, and they have long been "real named" behind. And actually I don't care how the gov track my activities, just care about the leaks of personal information, which were kept safe most of the times for big names.

</comment><comment><USER17> I wonder if this regulation will also apply to government sock puppets.

</comment><comment><USER18> It may be hard to persecute you if we cannot easily identify you.

</comment><comment><USER19> This isn't the craziest idea in the world. Trolls can be distracting and a ton of garbage to discussions. This isn't one of those "evil Chinese laws" in my opinion.

But I guess I'm posting this as someone using their legal name so there's that.

<comment><USER20> Someone trolling an Internet discussion board shouldn't result in a federal law removing all privacy from everyone. The trolls might stop, but what about government critics who are now being silenced because they will be killed if they reveal their real name?

You might not have to worry about your government breaking down your door if you post something negative about your politicians. Some people in other countries do.

<comment><USER19> While that's a good point I'm just playing devil's advocate here. It's probably among the least crazy things China has done.

By the way thanks people who disagree with me for the downvotes. Cause that's what they're designed for.</comment></comment></comment>


Ask HN: When are GUIs important? - <AUTHOR>

As a consumer of software, everything I use is GUI-oriented; however, as a newbie programmer, all the emphasis in my reading is on the functionality of the program. When are GUIs important? <comment><USER3> It all depends on who's using your software. I work on both the front and back end sides of a product at work. Generally if there is bug it's pretty easy for most to determine if it's the front or back end that messed up, and yet the customer blames EVERYTHING on the front end. It's not their fault either - they just aren't aware of our architecture, and probably never stopped to think about it, nor should they have to.

Keeping this in mind, you need to have a reliable back end, and a functional, presentable front end. The GUI doesn't have to be anything spectacular, just well organized so things make sense. Take this website for example - <USER2> fancy about this GUI. However, do spend some time making it organized and easy to use since that's what everyone will see. Worst case scenario, hire a designer from a local community college or elance.

Here's some general tips to make your GUI more presentable: 1\. Form fields should line up, and generally they should be the same size. Don't have some indented and others not. 2\. Try to keep your forms balanced across the page/screen. Scrolling down forever sucks, so distribute placement evenly. Similarly, horizontal scrolling also sucks so avoid that as well. 3\. Try to keep user inputs to a minimum. People are lazy. 4\. Use colors that work together. When in doubt, leave it black and white. Check out <http://www.colorschemer.com/online.html> 5\. Use colors as indicators. Green = success, red = failure 6\. Be consistent.

If you want to read an awesome book about designing GUIs try Smashing Magazine's book: www.smashingbook.com

<comment><USER3> Wow apologies for the horrible formatting. Another lesson learned the hard way.

</comment></comment><comment><USER4> The emphasis on functionality reflects the nature of the job. Software is generally like an iceberg in terms of time and complexity. The part you see is supported by a much larger chunk that's generally invisible. When you're starting out, it makes sense to focus on the larger, supporting part.

How important a GUI is depends on the nature of the program. A significant chunk of the world's businesses depend on apps that have no GUI while more or less everything consumer-facing has a GUI.

</comment><comment><USER5> Functionality is what the program does. The GUI is what helps the user exploit that functionality in the least number of steps and with clear prompting.

See this for an example of UI/UX importance: [http://ipadtest.wordpress.com/2010/04/20/when-will-lenovo- an...](http://ipadtest.wordpress.com/2010/04/20/when-will-lenovo-and-asus- learn/)</comment>


Thunderbird "papercuts" bug fixes - some continuing UX development - <AUTHOR> https://wiki.mozilla.org/Thunderbird/Papercuts

<comment><AUTHOR> "Papercut" is Mozilla's term for annoyances and inconsistencies experienced by users when interacting with an app.

6 devs (so far) plan to fix 5 of these each over the next year, and improve UX.

More details here:

[https://groups.google.com/forum/?fromgroups#!topic/mozilla.d...](https://groups.google.com/forum/?fromgroups#!topic/mozilla.dev.apps.thunderbird/DhH1wDgfvi8)</comment>


Show HN: PHP Library for Creating Well Formatted JSON Strings - <AUTHOR> https://www.reddit.com/r/PHP/comments/iie3m5/personal_php_project_jsonx_library/ <comment><USER2> As pointed out by the comments in the read thread, the built in json encoder in php can pretty-print the result if you really want that.

Also, FYI the readme on the project page has a bunch of spelling mistakes.

</comment><comment><USER3> there's a really bad naming conflict with an enterprise product that's been out for the better part of a decade.

<comment><AUTHOR> That's new for me.</comment></comment>