Ask HN: How do you visualize code in your head? - <AUTHOR> I just realized something a little weird. When I think about code, I see the code itself. I picture the text, line breaks, the structure of the file, etc.<p>What about you? Do you see colors? Shapes? Objects? Do things move or is the picture static? <comment><USER2> The word "visualize" makes this a somewhat leading question (though personally my process is visual/tactile).

The best book I know of about this is Jacques Hadamard's _The Psychology of Invention in the Mathematical Field_. He asked this same question of the important mathematicians of his day - and because he was Jacques Hadamard, they answered. Einstein's response in particular is fascinating. Although math is published in symbolic form, nearly all the mathematicians surveyed reported that they thought in images, sounds, or movements. Only Polya believed that his creative process involved symbol manipulation.

Seymour Papert's _Mindstorms_ is good reading too - the Logo turtle was very deliberately designed to transfer physical expertise into programming skill.

</comment><comment><USER3> I dreamed in code last night. It was the actual code, in different colors against a black background. I don't think that means anything, but it probably has a lot to do with staring at TextMate for 10-12 hours a day.

I'm actually going to implement the ideas I came up with in my dream, they were pretty good.

</comment><comment><USER4> This came up over breakfast this morning, coincidentally.

I start out with a mainly visual representation like a graph, with modules as nodes and edges as interconnections. I'm possibly strange in this regard, but my perception changes as things get more complicated. Once this graph gets sufficiently complicated that it's difficult to represent it as a planar graph (too much edge overlap), I lose the visual representation but can continue to reason about it. What's left isn't particularly visual, nor is it textual... I'm not sure how to explain it really. I end up manipulating this abstract "thing" in my mind, which I can translate (on paper or in code) to a concrete representation after the fact.

Anyone else have similar experiences?

</comment><comment><USER5> UML has influenced me into thinking of methods and objects as black boxes and focusing on the relationships between them as opposed to their implementation. A slightly abstracted view gives some much needed perspective and keeps it clean(er).

</comment><comment><USER6> Visualization is a key part in understanding the code. IMO if you can't visualize it then you do not have a proper understanding.

Visualization for me is at 1000 feet and i do not see all the details. I try to think and visualize each as objects and abstract out the details. I do not see colors and whenever possible i relate it to realworld object OR Object which we see in screen.

While working on a existing code, the Visualization is not complete. I do not try to visualize all the code in one day, i build it incrementally over a period of time. But before starting with the project/code I get a highlevel overview before getting into details.

I believe it is analogous to a Map, I create a mental map of things in code and use it as a reference, build it, improve it. Map is NOT a terrain, it just gives an overview of things.

</comment><comment><USER7> Depends on the type of code, for GUI related I visualize the interface as if it was in my IDEs GUI builder, where I mentally can double click a component to be switched to the relevant section of code.

I almost visualize flying through the GUI components to see code revealed underneath. I don't actually see lines of code (I guess my mental-visual resolution is too low) instead I sort of sense whats needed. I can 'feel' the code. What event listeners will be notified, what classes are needed, how the code flows, how it will mesh together.

But thats for when I am in design mode, when incurring technical debt and pushing towards a deadline my thinking is extremely non-visual, more auditory in nature as I verbally think though the problems in my head.

</comment><comment><USER8> Im not a very visual thinker, but I've been getting better at visualizing things. Since i mostly write lisp code i see it as it is, like a tree of expressions, instead of as a sequence of characters. I see my data structures and see the way they get manipulated as trees as well. I've been playing with graph algorithms, a DFS is remarkably beautiful to see, in ones head. You can see it as water spilled on the graph, and the vertices are like grooves the water flows through.

</comment><comment><USER9> I've kept an eye on this thread trying to think of how I think of code.

This is the best explanation I have -- I don't think in/visualize code at all.

I think of the individual parts that make up what I am trying to build.

This starts in the broadest sense (application requirements) to the more in depth needs (specifically what function ideas (what is going in, what is coming out) and in what order they will need to be in).

By the time I finish this architecture layout in my head, actually coding everything becomes very straightforward.

</comment><comment><USER10> I don't, really. Its just in my head, and comes out when it needs to. If that makes any sense.

Maybe a blob of unformatted information, if I had to pick something.

</comment><comment><USER11> When I code I have sort of a mental list I keep in my head for what I'm currently building. So I'll have textbox, textarea, submit button, trigger on submit, validation, database, sterilisation, etc etc. I just kind of work through the list in my head and often add to it as I think of something else.

</comment><comment><USER12> It depends what it is but typically no, my thoughts are much more abstract than pictures. It took me a while to realise that many people, often my clients, do not work like this and need to see things visually before it clicks.

</comment><comment><USER13> Lots of moving shapes, especially if there are threads. Usually they are visual-kinesthetic representations of how the data structures fit together, what they do (as movements), and what it looks like when there's a bug.

</comment><comment><USER14> I don't usually see code, but I see the architecture in flowcharts. For the parts which I've not completely worked out, the chart just fades to an ominous fog.

</comment><comment><USER15> very carefully?

I don't think it's really visual, it's just like metavisual thinking without engaging the phonological loop.

I visualize graphs most of the time, sometimes with colors or textures but usually fairly simple planar graphs.

</comment><comment><USER16> I see a haze of confusion and anxiety, usually.

</comment><comment><USER17> I'm definitely a visual-thinker. My code visualizations are largely influenced by standard representations of software (UML diagrams, state machine diagrams, block diagrams, etc.), but my mind's eye wanders all over the place depending upon what I'm doing. If I'm coming up to speed on an existing code base, I immediately begin forming a mental block diagram--simple blocks of varying sizes with little arrows indicating hierarchy. If I'm navigating any form of state, I see a state machine--generally a big blob that grows with the complexity of the machine, but with the states I'm currently inspecting in focus. When dealing with threading issues, I frequently see each thread as a square container with an animation of shared resources being passed from container to container. This is supplemented by something I can only describe as an animated timing diagram. I'm an embedded firmware engineer, working mostly in C. When thinking about anything that interfaces with the physical world, I tend to see a classic diagram--a temperature curve, motion path, timing diagram, etc. For timing diagrams, I'll visualize code snippets overlaid along the diagram itself--they're wrapped in small blocks whose size indicates my perceived latency of the code (to be updated as proven).

Reverse-engineering automotive ECU firmware for an engine-tuning company provided an interesting visualization experience. The task involved manual, static analysis of thousands of lines of uncommented assembly. I was using DataRescue's IDA Pro, which does a good job of visually separating functions and indicates code flow with lines and arrows in the left-hand gutter. It also keeps a color-coded, linear map of the entire codebase at the top of the screen--if you haven't seen it, it looks a bit like a typical visualization of hard drive fragmentation. I found myself navigating the code largely by keeping a map of blocks and a mental stack of my moves. The blocks were the outlines of left-justified disassembly text whose sizes corresponded to the size of a function. I started to quickly identify functions by their sizes and the vertical "cityscape" that the disassembly text defined. During this time, DataRescue introduced a new IDA Pro feature that visualized the code in a flowchart form. Sequential, non-branching statements were arranged in squares that were connected with arrows to indicate where their terminating branching statements could lead. It is a spectacular feature, but it obliterated the visual cues I'd been mentally mapping & greatly slowed down my navigation. So, I'd shut it off and navigate the "cityscapes" to find a function of interest, and then enable it to inspect the function in more detail.

I love this question & have repeatedly asked it of friends/colleagues. The answers feel like a peek into someone's brain, though honestly I'm not sure what I'm looking at. In any case, I'm considering adding it to our list of interview questions because it can spark great discussions about code structure and illustrate depth of experience. But I'd love to hear from non- visual thinkers how the wording would be best modified to accommodate you as well. How do you think about code?</comment>


Show HN: Redis-pipe – Use Redis lists like Unix pipes - <AUTHOR> https://github.com/lukasmartinelli/redis-pipe

<comment><USER2> See this for more inspiration (using pub/sub):

[https://github.com/whee/rp](https://github.com/whee/rp)

<comment><AUTHOR> Ah that's the same idea! Wished I found that before. Thanks man.

<comment><USER2> The interesting thing about rp is that you can use it as a pipeline in your other Go applications, as the Redis pub/sub "pipe" is exposed as a normal Go io.Reader/io.Writer interface. Might be something worth expanding on somehow.

</comment></comment></comment><comment><USER3> Why are you using LPUSH/LPOP instead of PUBLISH/PSUBSCRIBE?

I guess you get storage that way, but only one consumer of each message. It would be nice if it was optional in case you had a different application where you need to have multiple subscribers to the same topic.

<comment><AUTHOR> Yes you're right. I can create a flag --publish and --subscribe.

</comment></comment><comment><USER4> What's the benefit to use Redis pipe instead of Unix pipes?

<comment><USER5> I guess it might be very useful in a cloud like environment where you use this set up to pipe data across scaled up servers.

<comment><AUTHOR> I use it as a poor man's job queue.

cat jobs.txt | redis-pipe jobs

An then on several workers: redis-pipe --count 10 jobs | python do-work.py | redis-pipe results

An then in the end: redis-pipe results > results.txt

Or you can use it as simple logging mechanism: tail -f /var/log/syslog | ./redis-pipe logs

<comment><USER6> Poor man's job queue is celery with redis backend i guess.

<comment><AUTHOR> Mine is even more poor :)</comment></comment></comment></comment></comment>


Responsive Text - <AUTHOR> http://www.frankieroberto.com/responsive_text <comment><USER2> I may have a problem with OCD, but I would hate the idea that some content is hidden to me just because I'm browsing with the wrong screen/window size.

Hiding redundant elements, navigational bars, maybe images, etc... is fine, but I'm definitely not comfortable with the idea of hiding _content_ based on context.

<comment><USER3> Yeah, it's a very interesting idea, but I don't want half the article if I'm browsing on a mobile device.

Besides, I thought the point of responsiveness was to REARRANGE data, not completely eliminate it. styling, yeah, go ahead and get rid of elements and color bars and what have you, shrink pictures, but please don't throw away words!

<comment><USER4> This was indeed the idea of the W3C when they wrote this. The page he links to even says that:

<http://www.w3.org/TR/css3-mediaqueries/> "Among the media features that can be used in media queries are 'width', 'height', and 'color'. By using media queries, presentations can be tailored to a specific range of output devices without changing the content itself."

The part "without changing the content itself" is pretty clearly not what he is doing here. Like dozens of others have said, just an interesting idea but not something that should be used like this in practice.

</comment></comment></comment><comment><USER5> We do something similar to this on Lanyrd - try shrinking the browser window on <http://sxsw.lanyrd.com/> for example. The labels on the tabs change from "your sessions, your contacts' sessions, all sessions (1114), attendees (2594)" at the widest setting to "you, contacts, all, attendees" on narrower screens.

It's implemented by wrapping a span with a class of "not-narrow-friendly" around the words that should be hidden at narrow widths, then using media queries to hide them.

<comment><USER6> How would you handle internationalisation with that approach?

<comment><USER5> Not something we're worrying about for the moment - the advice we got from people who had done it was "don't do it until you have a much larger team".

</comment></comment></comment><comment><USER7> This reminds moe of Joe Davis' Telescopic Text: <http://www.telescopictext.com/>. Assuming you see this on a desktop computer, it's exactly the opposite of Frankie's responsive text: instead of gradually reducing the amount of information, it gradually increases it.

<comment><USER8> That's really clever. I would like to read news articles written like this: you just click on the parts you want elaborate on.

<comment><USER9> Not only would it be more convenient for you, to focus on bits of the story you're actually interested in, the newspaper could collect analytics on what parts of the story you're interested in, and suggest further articles, and highly-targeted ads, based on that.

Imagine you see an article about Christopher Hitchens accusing Henry Kissinger of war crimes, and Kissinger is wearing a smart suit, and you dive in to find out more about his couturier. The click-through rates on high-end clothing ads would be vastly more.

Though, to take the opposite tack: would this encourage newspapers to turn into something like mesothelioma blogspam? Writing about something, only because the ads associated with it are profitable, instead of because it's a Fact Worth Knowing?

</comment></comment></comment><comment><USER10> After thinking about it for a moment, my response is this: if the same idea can be delivered in fewer (words|paragraphs), then show the reduced form.

Tighter writing is clearer, and thus easier to read. If you can trim, you should be doing it anyway; leaving the extra amounts to cruft in most cases.

<comment> the-cakeboss While I think that is one response to this, you seem to be diminishing the importance that extra cruft has upon the _effective message_ conveyed. Simpler is more economic, but it also eliminates those ephemeral things communicated implicitly. A TLDR is certainly an adequate substitute for those not interested enough, but an abbreviation can never capture the full expressive thought contained in a larger, well written text.

Effective visual communication, whether it be anything from body of text to an icon, is not necessarily contingent upon its complexity.

<comment> user-id This is why including a summary prefacing long-form writing is such a good idea in general.

<comment> the-cakeboss I suppose, depending upon your aim.

(And by long-form, I assume you are talking about an article or something rather than a book.) If you aren't concerned with people actually reading your text then yes, thats probably a good idea. But prefacing in this manner generally tends to disuade meaningful consumption, "why read in 4 pages what was summed up in 4 sentences", a reader might think. I think prefacing could arguably contribute to effective communication, but it stifles engagement significantly.

Just my 2 cents...

</comment></comment></comment></comment><comment><USER11> A good implementation I've seen of something like this is a responsive version of data tables. Essentially, the data in the table is prioritized, and shown or hidden based on the available real-estate, along with the ability to override the defaults.

Demo available here: <http://filamentgroup.com/examples/rwd-table-patterns/>

<comment><USER12> I think this is a much better use-case for this kind of idea. I especially like that even if I shrink down my browser, I can still re-show the content that got hidden using the dropdown at top-right.

Maybe people's concerns about not seeing the full content could be alleviated by a similar solution for re-showing the text that got hidden in the OP's example?

</comment></comment><comment><USER13> Kudos. A similar idea I had but never implemented (no doubt I'm not the only one), that would show/hide text based on user knowledge rather than screen size:

      Mar. 21, 2010
      </comment><comment></comment><comment>-

      Sometimes when writing a blog post, article, or other composition that will be
      read by more than one class of audience, one audience can become bored or upset
      by content that is needed to bring another audience up to speed.  For example, a
      blog written by a highly technical person both to educate other technical people
      and to keep less-technical family members in the loop may include lots of
      simplified definitions of technical terms that most technical people already
      know.  To prevent alienation of the technical group while still preserving the
      definitions and explanations for non-technical readers, definitions could be
      surrounded by a span or div of class "nontech_definition".  A simple script,
      client-side custom stylesheet, or alternate stylesheet could then allow
      technical readers to set those definitions to visibilty:hidden or even
      display:none, and continue on their way uninterrupted by repetitive and
      unnecessary (for them) clarifications.  To alert the technical readers of this
      possibility, a note or link could be provided by the first definition on each
      page (or last, or as a footnote or tooltip, etc.) explaining how to hide the
      definitions.

This idea occurred to me while reading an article about VCs and startups. The article made repeated reference to BI businesses, but I had to look up the relevant definition of BI (in this case, business intelligence).

P.S. I'm sure my variation of the idea was anticipated by the creators of CSS.

</comment><comment><USER14> Here's a much better idea for responsive text: put a bare bones summary at the top, then expand the points below. This is useful for people on mobiles.

It's also useful for people with disabilities - blind people apparently like summaries and links, because otherwise it's hard for them to scan.

It also helps people who just aren't great at reading (or reading English), which is a huge deal these days. Almost half the web is below average intelligence now, and over half the web doesn't speak English natively. And _everyone_ is busy.

</comment><comment><USER15> This only makes sense to me in a progressive loading situation. That is, you load the summaries first, then load additional detail later in the rendering timeline. Fine; I'd get that.

But I don't like the idea of not getting the full story every time. Why not think a couple years out and assume everyone's connection is fast enough to handle text - LOTS of text - even over a mobile connection. It's _text_. Like one-or-two-bytes-per-character stuff.

I suppose it's also interesting as a navigational scheme. To show summaries automatically and expand on some user action, a la clear (<http://www.realmacsoftware.com/clear/>).

<comment><USER16> The problem with wanting to get the full story every time is that you look something up on Wikipedia and you end up reading the entire site.

</comment></comment><comment><USER17> A useful tool for examining responsive content across multiple displays, such as is demonstrated by this post, is <http://www.benjaminkeen.com/misc/bricss/>. It's a javascript bookmarklet that'll dynamically create multiple iframes, each set to the dimensions of popular device screens, and display them all on a single desktop browser window.

Great for side-by-side comparison and validation of media queries.

</comment><comment><USER18> A simple, standards-based way to implement this would be to use the HTML5 details and summary elements.

<http://html5doctor.com/the-details-and-summary-elements/>

You could make default the details to be "open" for big screens and closed, showing the summary only, for small ones. Downside is that you only get two levels if you stick to the spirit and letter of the standard.

</comment><comment><USER19> This is essentially the output phase of something I'm working on for my PhD. I've written a tool that can read salience-tagged CSV input and output a page of responsive text:

<http://stephenwattam.com/projects/responsivetext/>

The example's a bit crummy, but with some better input it should provide a useful base for visualising important text features.

</comment><comment><USER20> My problem with those responsive web sites is that they only react to changes of the browser window width, but not the height.

For example, on this page, you can change the width so that we only see 3 short sentences. But if you change your browser height from 800x800 to 800x350, you still get the full, long text, but it's cut off in the middle, and there is a scroll bar. If the author's intent was to try hard to show those 3 short sentences without readers needing to scroll, then it fails here.

Responsive websites should be thinking "ok, I've got this amount of space here, let's fill it in the best way possible", not "ok let's make 3 designs based on browser width".

<comment><USER21> Absolutely. Responsive design is simply shifting two-column into one-column and getting away with it. That's not always a preferred way, I'd say.

<http://news.ycombinator.com/item?id=3597932>

</comment></comment><comment><USER22> I like this technique, and I think it would be appropriate to extend it other hierarchical types of data besides just text. For example, a product page might show a list of reviews, with each shown as x/5 stars, and zooming in on the reviews would show the review text. Same with product info - zoomed out = overview, zoomed in: more details appear. This would require zooming in on a specific section of a page though, not just making the entire page bigger. Imagine browsing an online store or search results by zooming in/out using a touch interface, rather than clicking on links to details/reviews/photos

</comment><comment><USER23> I love the idea, but I suspect that most people writing the sorts of content that could benefit from this wouldn't take the time to break down their work in a way that would take advantage of the layout.

<comment><USER24> I agree, but I think this format could work well in certain situations where it can be done automatically, like for comments with karma. You could vary the threshold for hidden comments, so mobile users see less but overall higher quality comments (with a link to show hidden ones), and desktop users see all by default.

<comment><USER25> Are you talking about (a) completely hiding low-karma posts, or (b) "minimizing" the text of those low-karma posts in a way similar to how the example works?

If it's (a), that's basically what sites like Slashdot and Reddit already do for desktop users.

If it's (b), the obvious question is how you algorithmically filter text to only include the pertinent information (the given example is almost certainly hard-coded), which doesn't sound like a simple question to answer.

<comment><USER16> Maybe you could put unpopular posts in shades of grey? Or smaller fonts?

</comment></comment></comment></comment><comment><USER26> Hiding text elements on simple, informational sites can work. On mobile devices, the performance hit of loading additional elements is compounded because of the slower connection.

The general rule of thumb is if you have a complicated application, consider building a mobile optimized (*not responsive) site or a native application (even better if you have time & money). If you have a simple informational site, I think hiding elements can work though you have to question if you needed the extra copy in the first place.

</comment><comment><USER27> This could be automated by using text summarizing algorithms which pull out key sentences. Then, when you come across a long article, just shrink the screen to summarize.

OS X has a text summarizer, which my brother used to great effect in grad school. Most of his readings were digital, and he just ran them all through the summarizer. He had no trouble participating in class discussions, though occasionally a professor would look at him oddly and say "Well, that wasn't really the main point."

</comment><comment><USER28> The author is a clever and talented guy, but this is _terrible_ idea. I sincerely thank the author for expanding the way I think about content and presentation.

</comment><comment><USER29> Excellent idea. I like the idea of different content (rather than only different design) for mobile devices - only show what is absolutely necessary. I also really like that this is done with CSS; much cleaner than a mobile-only site, though you aren't saving any bandwidth here (it's just text, though). Anyway, nice experiment.

</comment><comment><USER30> I could see this as a useful tool to create "skim" and "full text" versions of content, especially reference material.

</comment><comment><USER31> There are situations in which I might want less textual detail, but they are never indicated by browser window size. Indeed, my iPhone, which has the smallest "window size", provides an excellent experience for reading large amounts of text (especially due to the Retina Display).

</comment><comment><USER32> Excellent idea. Especially in regard to shortening the titles on navigation elements, buttons, and links. Longer, more descriptive labels when screen real-estate allows. Shorter, perhaps more cryptic but made-to-fit, labels when screen real estate is limited.

</comment><comment><USER33> I had been using very similar technique in my blog (<http://laktek.com>), for excerpts and posts lists.

Actually, I believe all contents in a site should have a ranking and loaded depending on the context.

<comment><USER34> In the end, we'll have so much extra markup and scripts to execute that the users get annoyed by slow downloads and choppy performance, instead of having to zoom interfaces :)

</comment></comment><comment><USER35> Interesting approach, ultimately though we'll want to optimize for physical device size and distance between user & device :)

I guess this will get easier once almost every display uses the ppi of the iPhone 4.

</comment><comment><USER36> Brilliant!

Are you using the Summly API to condense the text?

Could be a good solution to @kyle's comment.

</comment><comment><USER37> The Boston Globe's home page (<http://bostonglobe.com/>) does something similar with columns.

</comment><comment><USER38> I would hate to have to resize my window every time I want to read a more concise version of an article. Still, looks like a fun exercise.

</comment><comment><USER39> Ugh, this strikes me as a terrible idea.

If it's not important enough to show on mobile it can probably be removed on the desktop too.

</comment><comment><USER40> After a significant amount of window-resizing this ended up throwing webkit into an infinite loop. Impressive.

<comment><USER17> Which browser/version/OS?

<comment><USER40> WebkitGTK 1.6.3 on Linux. It's deep within a size recalculation callback, so my guess is that scrollbars appearing/disappearing cause a "feedback" loop where there is no stable size to choose for the given window size.

</comment></comment></comment><comment><USER41> One problem is that you're delivering all the content to the mobile device anyway.

<comment><USER42> Isn't this a problem with responsive design as a whole any way?

</comment></comment><comment><USER43> It's like the OS X Summarize service, but on a webpage :)

<comment><USER44> Has anyone actually ever used this service to any productive end? I never saw the appeal (and don't understand how it got there in the first place), but maybe it's extremely useful to some niche category of users.

</comment></comment><comment><USER45> umm, <http://www.abookapart.com/products/responsive-web-design>

</comment><comment><USER21> Somehow, I feel that even responsive web-design is a half-ass solution to scaling a web-app from a mobile/hand-held to a LCD screen.

For example, right now I am watching your Responsive Text page on an 1920 x 1080 (49" LCD panel) and the text did not scale to a level to which it could. Besides it's not just about font-size or image scaling. It's about managing the size of each pixel too, so that things remain in proportion.

I know this is a hard problem, and there has been no acceptable/worthy answer to this question on SOF either: [http://stackoverflow.com/questions/8421533/how-to-obtain- ctr...](http://stackoverflow.com/questions/8421533/how-to-obtain-ctrl- behavior-on-a-browser-using-javascript)</comment>


Ask HN: What can I do to look like a better developer / job candidate? - <AUTHOR> I've been a hobbyist developers for about 6 years now, however, lacking a degree, it seems impossible to get into software development. The only "experience" I have is about 2 years of doing freelance work where I did nothing but work on Wordpress sites and wrote a little Node.js. Not very helpful when all the jobs around me are .Net. What are some ways of making myself look better as a candidate? <comment><USER2> First show initiative that you are able to learn the technology that companies are using. If you have time, start learning these technologies on the side and put them on your LinkedIn. Pluralsight (paid service) allows you to link your completed courses to your LinkedIn as certificates of completion. If you are a coachable person and understand the basics of technology, you are a "good" candidate for a job. Good luck!

<comment><AUTHOR> I can surely do that and even plan to, but I feel that the next guy can load his resume with a degree and cert's and beat me. Even if I'm better than him.

<comment><USER3> Plenty of people have the degree but don't have the right attitude. My experience is that "self taught" developers can be great to work with. If I was looking for a "data scientist" or somebody to write compilers, I would probably expect someone to have a degree, for an application programmer I'd prefer somebody with experience and pluck over somebody who just has a degree.</comment></comment></comment>


UTC is enough for everyone right? - <AUTHOR> https://zachholman.com/talk/utc-is-enough-for-everyone-right <comment><USER2> This is from May 2018 and while it's interesting the product the essay is written to support...is no longer a thing. Well at least Zac learned a lot by time, I hope it wasn't a waste of...

</comment><comment> mark-r I once worked at an American company with an Irish branch. Some software I was working on had to display dates. I tried to get them to standardize on ISO-8601 so that I could use the same format both places. I wasn't successful, the best I could do was get them to compromise on this monstrosity: 2019-Oct-22. At least there was no confusion about which was the month and which was the day.

</comment><comment> m-p-3 This is an article that everyone should take the time to read about, and the tone about it makes it really fun to read.</comment>


Haskell: Pure and Lazy, yet Functional - <AUTHOR> http://www.updike.org/articles/Pure_Lazy_Functional

<comment><USER2> If you haven't tried it yet, Haskell is a real joy to use. There's a Batteries Included binary distribution <http://hackage.haskell.org/platform/index.html> , and a really good free online book for it <http://book.realworldhaskell.org/>

<comment><USER3> <http://learnyouahaskell.com/>

Worth a look, too.

</comment></comment><comment><USER4> _It allows you to divide the problem up into smaller conceptual units which get combined in an efficient way [2]. For example you can write your code in this clean (seemingly inefficient) style, where each piece does something self-contained to an entire list or string: (a) read an entire 1GB file, (b) split the file into a list of words (c) make a new list that has the word "the" filtered out, (d) append the words back together into a string (e) write the whole string to a file.

The compiler, however, glues this all together as if you had written a single chunk of code that (a) reads single characters from the 1GB file until (b) you have a full word (c) throwing out the word "the" in the process, (d/e) and then writing each letter of the current word to the file. Notice how this "single chunk" style never reads in the entire file, only enough to look at a word or character at a time (or maybe 1k chunks if you have buffering set, for efficiency)! Also notice how an ordinary "single-chunk" style of programming would not allow you to split up each of the subtasks (a-e) into totally separate functions [3] that you can use elsewhere in your program: they are stuck directly inside your while or for loop! One of the only (and bad) ways to get around this in C++, for example, is with macros (Or write your own lazy streams/lazy strings library). This one is a bit subtle._

Sigh. You are about to get flamed, you poor naive fool. Never, ever direct an attack towards C++, especially when you don't know what you're talking about. This is what iterators do in C++. You can write objects which are called over something that allows iteration, and they can be inlined together. So you end up with a single iteration over a collection, with minimal intermediary data structures, but modeled in convenient discrete steps. Also worth noting is that this has nothing to do with laziness at all. In fact most powerful languages allow for something like this, going all the back to at least APL.

 _You can use iterators to solve this, and indeed this is why all these imperative/object-oriented languages have had to add iterators to the language: to allow you to write code that doesn't evaluate everything too soon, to be more lazy. The cost of iterators (at least to me) is you actually have to change gears mentally and syntactically. You now have to (a) know the syntax (which varies from language to language) and (b) make some kind of class with some methods, write all these little bits of code, and of course, if you never reuse the code, it was a complete waste, you should have just coded it directly into your loop._

Er, iterators are reusable. As reusable as functions intended for fmap in Haskell are, generally.

By the way, with your 1gb file example, you would not do this with regular recursion or folds over lists in Haskell, since space usage will explode during your intermediary list allocations. You need to use iteratees or some other way that gives determinate space usage. An explicit recursion from the right or a normal fold will kill you.

 _Haskell is even more weird than all these other languages because it is "purely functional". That means you cannot mutate variables or introduce "side effects" anywhere in your program (short of I/O). This is good and bad. One of the major benefits is that you never have those bugs when some code changes something in place over here in your program and you don't notice it until it breaks something way over there. In addition, the compiler is guaranteed certain things about each function and can perform certain optimizations at compile time. The bad part is that there are certain things that are more natural or more efficient just to "vary" variables in place, like the computer hardware does underneath._

You probably should have mentioned purity _before_ laziness, because you would have a really difficult time creating a lazy language that wasn't pure. Anyway, in Haskell, you can use the ST (or IO) monad to do efficient, safe, pure in-place mutations.

 _If you write "a = 4" then you cannot later say, "a = 5"_

        foo x = x + a
          where a = 4
                b = a + 2
                  where a = 5

alternatively

        do a <- readFile "foo.txt"
           putStrLn a
           a <- readfile "bar.txt"
           putStrLn a

(if you enable warnings in GHC, the compiler will tell you that you are shadowing existing bindings.)

 _The hardest thing about learning Haskell is perspective. There is an old saying that goes something like "Any FORTRAN programmer worth his salt can write FORTRAN programs in any language." But one thing they got right when they designed the language is that it is so different that you can only program in it 'in Haskell," thinking in Haskell. Your program won't work unless you understand Haskell. The old ways of writing programs (C/C++/Java/Perl/FORTRAN) don't work in Haskell._

Sure you can. Just do everything in the State, ST or IO monads. In fact, Haskell makes for quite a nice and elegant imperative language, used correctly. If it's Turing-complete, it's FORTRAN complete.

Haskell is cool, and I'm glad the author of this article is liking it so far. But I encourage people to hold their tongues until they know more about which they speak. Misguided advocacy will just bring on flames. None of the examples provided help any arguments he tries to make, which generally seem to be mistaken. I do not think he really understands laziness yet; none of what he wrote really has anything to do with laziness (except not needing a special form for conditionals). I did not understand laziness at first, either (and feel like I still don't!) so I hope he will retract this article before it brings on the legions of programmers from other languages capable of deftly defeating all of his examples in their own language of choice.

I encourage everyone to learn more about Haskell, but there are many pieces by many other authors of a very high caliber. There are lots of great learning resources now, and all of the tools to learn yourself install readily on all major platforms.

<comment><USER5> Iterators sometimes require restructuring, as in

<http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html>

In Haskell they don't - you might write this "producer-consumer" composing a function that produces a stream with a function that consumes a stream. How would you approach that problem in C++?</comment></comment>


Ask HN: What is the preferred cheap host (for low bandwidth sites)? - <AUTHOR>

Hello, I found out a couple days ago that my mothers small business's site was recently wiped out due to her hosts bankruptcy.  No notice, no backup, and the custom CMS she was using is gone.
I offered to set her up with a new site, and after looking at a feature comparison of the python CMSs I think FeinCMS over Django-CMS-2 is the right choice, for the in-place editing.  I chose python, because I have recently learned the basics, and I would like to learn Django and PostgreSQL for a project I've been interested in forever.
While I have tentatively chosen my tools, I do not know which host to choose.  Dreamhost looks like a good choice for her low bandwidth site.  They seem like jokers, but it's almost endearing.  The only negative I see is I would need a dedicated server if I want to install PostgreSQL.
Are there any other hosts I should consider?
(I don't think this should go to the front page, but the discussions about Dreamhost look outdated or of questionable experience.  I'm pretty sure I'm ignorant of something important, hoping to learn about it.) <comment><USER2> If your site were static or PHP-based, nearlyfreespeech.net offers a really good deal: you pay only and precisely for what you use in terms of bandwidth and storage. Unfortunately the only way to use Python or other languages on it is via CGI (not even fastCGI or SCGI, which would be tolerable).

</comment><comment><USER3> Google App Engine is free up to a certain usage level (certainly accomodates low bandwidth). I'd avoid dreamhost or other shared hosts as they won't handle spikes well. Someone like mosso cloud/rackspace cloud or amazon cloud computing would be better I think. Maybe even a virtual machine with fsck or linode or slicehost.

</comment><comment><USER4> If you're canadian, or from quebec in particular <http://globecite.com> and <http://www.hosting-canada.ca/> are really good and have good support. I think they're run by the same company, and they're not going anywhere.

</comment><comment><USER5> You probably looking for Hostgator and a Wordpress or Drupal CMS and I would never let my mother touch python!

<comment><AUTHOR> :) You're probably right, but I'm selfish and if I'm going to do this I want to learn something.

</comment></comment><comment><USER6> could you define your parameters for "cheap" and "host"?

my cheap host is a slice from slicehost.

<comment><USER7> I just started using <http://prgmr.com/xen/> \-- a (much) lower cost alternative to slice/linode... works great. It's a small company, but I couldn't be happier... the guy who runs it is active here.

<comment><AUTHOR> This is wonderful. It looks out of my league though. I'm looking to learn by doing here, but that approach might be a bit much. (I have a soft spot for small businesses.)

</comment></comment></comment><comment><USER8> Webfaction

<comment><USER9> Seconded. I wrote a basic blog/portfolio on Django for a designer friend of mine, and Webfaction has served his needs extremely well. If you do not wish to administer a VPS from Slicehost or Linode, Webfaction is an excellent alternative -- it gives you most of the same power (with the ability to run Rails, Django, or just about any environment you please) but without the administrative overhead. Though their control panel is not as powerful as Dreamhost's, it doesn't really want for it. For anything that will be used in production, Webfaction is a better choice than Dreamhost, as Webfaction's servers are much more responsive due to a substantially lesser load.

<comment><AUTHOR> You know, this is exactly the perspective I was hoping for. This will likely be my choice.

A little surprised everyone is positive. I guess I was wrong thinking it was possible to make a mistake here.

</comment></comment></comment><comment><USER10> Google AppEngine</comment>


Can you pick out a brand just by their button design? - <AUTHOR> https://medium.com/design-ux/77eb4f9a439d

<comment><USER3> I have some experience as a UI/UX engineer, and here are my thoughts.

First of all, this is a brilliant topic and this article does a really good job at trying to get people understand the importance of buttons.

But, at the same time, I disagree with the author that buttons are the only thing that represent your brand and it is extremely important to get them right.

I would like to cite everyone a real world example - Google. They use a combination of blue (Search), grey( Gmail, Search, Apps), red (Gmail) and green (Adwords) buttons across their product ranges. And their buttons aren't the same across their product ranges - For example, the orange button on the Blogger platform is totally different from the one on the Search home page.

As a start up, it is important to do only one thing with buttons - <USER2> uniformity. Google maintains uniformity _within_ its product ranges, though they vary from product to product. (I use Google as a reference, because they are one of the most successful companies on the Internet)

So, if you notice Apple, they maintain the glossy-ness of their buttons throughout their product pages. In no one page about a particular product will you find a non-glossy button (like on the Windows Metro UI) mingled with a glossy button. This is the only thing you should be careful about. Otherwise, it's actually okay to use what you like. I've even seen many companies rip off each others' buttons. (For example, 500px and Stripe use the same blue glossy button).

Buttons don't represent brands, it's the colors that do. When it comes to buttons, you actually don't have much choice, and this article doesn't point that out. Buttons are usually call-to-action elements and need to be represented with good contrast or 'attention-seeking' colors to convert well. That is why most websites use Green colors for sign-ups (or blue, sometimes), because they convert well (You can read more on Psychology of color to understand this).

Important buttons are mostly colored red for the same purpose. (The Compose button in Gmail, for example). So in short, the color of your button doesn't (and cannot, unless you are someone like google with all the prominent colors in your logo) represent your brand _entirely_. Your brand is composed of various things - Color schemes, Logos, Typography, etc. Buttons are just a tiny part of it.

The color scheme for every brand is what that everyone recognizes. Just get that right, and you should be good.

Hope this helps.

</comment><comment><USER4> > Buttons can make or break your brand. Buttons can be your sites most > recognizable brand element besides your logo. A well designed, unique button > style can be the key to establishing and maintaining trust in your site.

Well, I had absolutely no idea on any of the buttons. So I'm:

> 0 - Congrats. you're normal, not an internet nerd like the rest of us.

Perhaps that should be better written as:

> 0 - Congrats, you are strong evidence against my claim

<comment><USER5> Same, I got 0. Even after he mentioned amazon, I went back and looked and couldn't see anything that made me think of amazon. For context, I visit amazon maybe once a week.

<comment><USER6> Also the same. I could sort of recognise the Amazon one once I knew which one it was, but even then I wasn't 100% sure.

</comment></comment></comment><comment><USER7> Engaging post, but I do not agree with the author's assertion that "Buttons can make or break your brand." As a designer, I've spent a lot of time crafting pixel-perfect buttons, but out of these examples, I could only pick out Amazon, Square, and Svbtle (which most people have never heard of).

I think my takeaway from this article was, design attractive buttons that look and work consistently, and then go do work that matters.

<comment><USER8> Yep, the only way I can see this being anything close to "make or break" would be in the case of large, inconsistent, unintuitive icons / images as buttons.

</comment></comment><comment><USER9> I think his example may be counter to his point.

I didn't recognize one brand from their buttons (even Facebook which I kicked myself for not recognizing)

<comment><USER10> I recognized facebook because i recognized the facebook blue, not the button. And the amazon button is very distinctive. The rest, not so much.

<comment><USER11> Ditto here. I recognized Facebook, Google, Pinterest, Yahoo, and Amazon not because of the button designs themselves, but because of their colors.

Google has a very recognizable three-tone UI which extends beyond their buttons. Facebook, Pinterest, and Yahoo all have a unique shade of a particular color that they claim as branding (blue, red, and purple, respectively).

If anything this seems to speak to the importance of branding colors than button design.

</comment></comment></comment><comment><USER12> It's a shame the buttons are in JPEG form. I can barely see past the artifacts.

EDIT: Incidentally, I got 8. There were only 9 services that I have ever used, so I don't think that's too bad. Are there really that many people who have used _all_ of those services?

<comment><USER13> Medium Dev here, this is our fault. We convert images to JPEG when sizing and cropping, this obviously doesn't work well for vector style graphics.

We didn't want people to have to wait for a 500K PNG when a 60K JPEG would work for most cases. But, I think we'll probably make a change soon to keep the format the same as whatever it was uploaded with.

<comment><USER12> By the way, since this image is mostly flat colour, you may find that PNG compresses just as well as JPEG.

EDIT: Turns out the PNG is 95K, versus 62K for the JPEG. Worth the increase IMO.

<comment><USER13> Agreed, I'm going to make the change.

</comment></comment></comment></comment><comment><USER14> I think this post would be more interesting as the exact opposite:

I scored 1 (recognizied Amazon's buttons) but I'm confident I would have gotten much, much higher if instead of seeing the buttons with no text, we were shown the text with no buttons.

</comment><comment><USER15> Gmail, Twitter, Facebook, Yahoo, Instagram, Flickr, Amazon

Are the ones I got.

Actually thought Square's was bootstrap.

The the average user, buttons styles may not mean much if at all, but for those that with a keen eye and pays close attention to minute details and pixels, it's quite telling which button belong to which brand.

Saw #4 and was wondering 'What the fracking frack? Is my Little Pony Friends part of this test?' Then I learned it's Microsoft…

The 'easiest buttons to identify for me was Facebook's and Google's.

<comment><USER16> I thought #11 was Amazon (it looks just like the buttons on Kindle) but this could have been because I was reading my Kindle on the tram home, and it was the last example of such buttons that I saw.

And I've never heard of _Svbtle_.

</comment></comment><comment><USER17> Wow, terrible post that is a _theory_ that he posts as fact. It's a theory and while it might be interesting to do an experiment, so far (from the comments here) it's a theory that isn't true.

I didn't even get Facebook even though I knew one set had to be Facebook..

</comment><comment><USER18> Didn't get any but tumblr (not even facebook, which now seems obvious). Never used the website before, but that exact color combo is pretty unique. No one else recognized it? I think it's telling that only 4/18 don't have a blue button.

</comment><comment><USER19> Or you can do like 90% of the web and use Bootstrap.

<comment><USER20> Maybe 90% of the web that gets posted to HN, but it's probably only 8% of what gets posted to HN, and some tiny fraction of a percent of the entire web. For those of us who remember the pain of wrestling with web app design a decade ago, Bootstrap is a boon and tools like it will hopefully raise the common denominator! :)

</comment></comment><comment><USER21> Button design can affect conversion rates, and that's roughly about it. I only got one and I use many of those other brands regularly.

</comment><comment><USER22> Interesting. #15 just screams "Amazon" to me. Not the faintest idea on any of the rest.</comment>


Show HN: Private group and event based sharing platform - <AUTHOR>

Check out our web and mobile apps
http://trycapsule.com
Capsule is a private group and event based sharing platform built on the premise that most real-life networks are born and die around shared experiences. <comment><USER2> Clickable link: <http://trycapsule.com>

Good luck!</comment>


The Whitehouse's New Executive Order on Cyber Crime Is (Unfortunately) No Joke - <AUTHOR> https://www.eff.org/deeplinks/2015/04/whitehouses-new-executive-order-cyber-crime-unfortunately-no-joke <comment><USER2> Well, I can paraphrase my own comment from the thread about Australian elections:

You can slander everyone who discovers vulnerabilities in your software, and you can even lobby to make it illegal to disclose those vulnerabilities, and throw people in prison over it, and so on... and your software will go right on being vulnerable. You can put every security researcher and white hat in the world in prison on trumped-up charges and throw away the keys, and it will not make your software one bit more secure. It will probably make it a great deal less secure.

Which is to say that this EO will accomplish exactly the opposite of its supposed goal.

It's like, even if I convince every human being alive that I am not bound by the laws of gravity, if I jump off a cliff I will die all the same. To think otherwise is _insane_ , but for some reason when it comes to software (and hardware) security we give people a pass. (Not we in the tech community, but we who vote.)

This is one of the Big Problems with human reasoning. Maybe the biggest. It really does seem that most people, if you drill down, truly and fundamentally believe that the laws that govern all of reality, will respond to a popular vote. That if we all _believe_ something hard enough, reality will take notice. Thus we get policy which is totally divorced from the goals it is purported to serve, and not held accountable to them at all. As though the President of the United States can argue with mathematics or psychology and win.

</comment><comment><USER3> Shame on the EFF, which I normally support, for jumping on this bandwagon of terrible journalism.

The EFF insinuates, without saying outright (since they must know it is false), that this is a _law enforcement_ policy like the Computer Fraud and Abuse Act. A law enforcement policy is one where, if you're sitting at your desk, and the government thinks you've hacked into someone's computer, the government throws you in jail.

This executive order has _nothing_ to do with domestic law enforcement, like Aaron Swartz or Kevin Mitnick or Dread Pirate Roberts or whatever. It is a _foreign policy_ decision. The US maintains a public list, called the SDN list, of _foreign_ entities that American citizens and companies aren't allowed to do business with. These are normally agents of governments the US doesn't like, eg. Iran and North Korea. This order adds hacking to the list of reasons why the President can put an entity on the SDN list. If, say, a Chinese defense contractor started hacking into American computers, the President can now prohibit American businesses from trading with them.

Under this order, the _only_ way you can go to jail (that you couldn't go to jail for before) is if a) the President suspects some foreign person or company (say, a Chinese defense contractor) of hacking; b) the President decides to put that company on the SDN list; c) you _know_ that company is now on the SDN list; and d) you buy things from, sell things to, or otherwise do commercial business with that company.

I think it's a bad idea for the executive to have the power to add people to the SDN list without judicial oversight. But they _already had_ that power; this isn't really anything new. Claiming it is just confuses everybody.

<comment><USER4> Not a lawyer, but sounds to me like Dread Pirate Roberts could still find himself on the wrong side of this sort of this EO:

"Sec. 5. (a) Any transaction that evades or avoids, has the purpose of evading or avoiding, causes a violation of, or attempts to violate any of the prohibitions set forth in this order is prohibited"

Broadly interpreted, wouldn't that be used against crypto-currency developers or secure communication tools developers that work on such tools with the knowledge that they can be used by sanctioned individuals or organizations? How about developers who write secure communication or security testing tools and sell them online without the ability or interest to verify who the purchaser is?

The Patriot Act was also supposed to be about targeting only a few hostile foreign organizations, and yet it had massive implications for everyone living in the U.S. and abroad. Now, I get that an EO and a law are different things, but still, I can see potential implications of the general trend of the U.S. government seeing cybersecurity as something you throw sanctions and laws and deterrence at until it stops being an issue, without considering the potential collateral damage or overreach.

<comment><USER5> Given he tried to have several people killed I imagine he finds himself on the wrong side of multiple executive orders, laws and moral frameworks alike...

As for your second paragraph I would imagine you'd have to prove some form of intent in order to throw someone in jail?

<comment><USER6> Do we know if he really did ? I thought this was all speculation from the prosecutor to shine a bad light on the character. He never was convicted of it for sure.

</comment></comment></comment></comment><comment><USER7> It shouldn't matter whether Section 1(ii)(B) restricts itself to foreign actors, because the underlying law that animates this executive order, the International Emergency Economic Powers Act (50 U.S.C. 1702) _is_ limited to foreign transactions. In fact: it's kind of weird that they'd even raise the question. Fundamentally, the President can't make new laws, and they know that. He's exercising powers that Congress delegated to him, and he is limited by the scope of that delegation.

</comment><comment><USER8> A few others have mentioned this. The EO is tailored towards those outside the US and is a response to overwhelming cyber attacks. Sanctions are one of the US's tried and true international political weapons. They aren't going to be sanctioning US researchers, nor US-allied parties. The EFF seems to be confusing what is an EO targetting Chinese and Russian hackers and their funders with civil law? The EFF is normally very careful about these sorts of distinctions - so I'm very confused.

<comment><USER9> It has a clear purpose the public can get behind, but it will almost certainly be abused for persecuting domestic political rivals, software developers among them.

Here are some entertaining thought exercises:

A cyber 9/11 is linked to Bitcoin. Can Bitcoin developers be sanctioned?

A cyber 9/11 is linked to Tor. Can Tor developers be sanctioned?

You donate to Wikileaks, which is linked to a national security threat. Can you be sanctioned?

Section 1(ii)(B) applies to _any_ individual or entity, domestic or abroad, developing or facilitating development of pentesting or related software employed against vague and faceless "national security interests". But don't you worry, because this is only applicable to the "Chinese" threat which may actually be true for the first couple of years to build political support for the eventual, predictable abuses of power.

<comment><USER7> No, "Section 1(ii)(B)" does not work that way.

</comment></comment></comment><comment><USER10> Discouraging hacking domestically it will widen the skill gap between foreign hackers and domestic white hats.

<comment><USER11> Why? You can set a LAN on your VM and hack all you want. Do you really have to attack your neighbor?

</comment></comment><comment><USER12> It's hard to take an article seriously when they use the spelling "Whitehouse" in the title, and harder yet when they alternate between that and the (correct) White House within a single paragraph. I see there were two authors for the piece- wasn't there an editor?

I would very much like to see a separation between the high-quality investigative journalism from the EFF and their opinion pieces, which I wouldn't mind if they were under that heading.

</comment><comment><USER13> If you can't pratice defense / train on your grounds, isn't it giving your enemy an advantage ?

</comment><comment><USER14> It may be time for a constitutional amendment forbidding the United States government from any action that would impact the Internet -- save those maintaining free and unencumbered flow.

It'd be better for each of us to fight off APTs and other problems by ourselves than to head too far down the road of good intentions and unintended consequences.

</comment><comment><USER15> A lot of you seem to be _assuming_ the EO applies only to people outside the US. It would be a good idea to actually read the EO, which is NOT restricted to people outside the US.

From the EO[1], reformatted to show clause structure:

        Section 1
            (a) All property and interests
                ... of the following persons
                ... are blocked
                (i) any person determined by the Secretary of the Treasury
                    ... to have engaged in
                    ... directly or indirectly,
                    ... any activity originating form,
                                     or directed by
                                     ... persons located outside the United States
                    that are reasonably likely to result in
                    ...a significant threat to national security
                                               ...or economic health
                    ...of the united states.

This language targets "any person" that meets some shockingly vague criteria[2] by few government officials[3]. The clause with "outside the United States" is not describing the person being targeted by the EO; that language is a detail about the type of activity that the targeted person is doing.

If the attack is directed by someone outside the US, and you are determined to be indirectly "engaged in" or "complicit with" that that activity, you are targeted by this clause. Neither you nor the attack itself need to be outside the US, as long as it is directed by someone that is outside the US.

What kinds of activities? In a previous thread I mentioned[4] how the EO doesn't prohibit harming "critical infrastructure", but instead prohibits:

        Section 1 (a) (i)
            (A) harming, or otherwise significantly compromising
                a computer or network of computers that support
                ... the provision of service
                ... in a critical infrastructure sector

            (C) causing a significant disruption to the availability
                of a computer or network of computers

Note that section (C) does _not_ limit itself to a "critical infrastructure sector".

There are so many vague and undefined terms in this EO, I wouldn't be surprised if this EO could be used against some kid that is "indirectly" engaging in a DDOS[5] being run by some *chan troll outside the US.

Also note: the EO doesn't mention the SDN list at all.

\--

[1] [https://s3.amazonaws.com/s3.documentcloud.org/documents/1699...](https://s3.amazonaws.com/s3.documentcloud.org/documents/1699240/executive- order-obama-establishes-sanctions.pdf)

[2] "reasonably likely to result in"? seriously?

[3] those officials, by the way, can delegate the power according to Sec 8 of the EO

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

[5] does github-attack style injected javascript count?

<comment><USER7> This analysis makes sense only if you believe the President can do whatever he wants in an executive order. Of course, he can't. Executive orders have only the flexibility allowed by Congress. You've read the text of the order, but not the laws its based on, and those laws contradict your analysis.

<comment><USER15> This is a good point, and may account for some of the vagueness I'm concerned about. I will have to do more reading.

</comment></comment></comment><comment><USER16> Is this related to China DDOS'ing the NY Times and Github a few days ago?

<comment><AUTHOR> Probably, and I hate knee-jerk reactions like this.

<comment><USER17> I don't think it's a knee-jerk reaction. For me it's easier to believe that this EO was signed deliberately to make every important security researcher guilty by default. It's hard to go against a government that can always punish you for what you have already done.

</comment></comment></comment><comment><USER18> Prisons are getting empty, it is time to start "war on hackers and pirates" :-(

</comment><comment><USER19> When I read the executive order it appears to explicitly target people "outside the US".

Basically the internet changes the paradigm of law enforcement. I get the impression this is a step toward allowing US to "penalize" people who actively seek to disrupt computers / networks in the US from abroad.

If you spend too much time trying to figure out all the tiny details and put them into the eo this is where (a) you can waste time nitpicking instead of spending that time enforcing, (b) cases get thrown out of court on technicalities just because "this is what the law / eo says". Instead I prefer a system where executive / judicial branches of government can spend all their time analyzing a case based on the merits alone and not on the technical jargon that may or may not be included in the law / eo.

I prefer the approach of "give the elected representatives a leash, but a short one". Spend less time agonizing over exactly what the law should say, and more time analyzing whether or not the law / eo is being enforced in good faith.

The one exception to this rule is if you have (a) an overly broad law / executive order, and (b) an executive branch who is not transparent about how they enforce those laws / executive orders.

<comment><USER20> I could not disagree more. The only way to keep the "leash" short is with a great amount of precision in writing laws.

There is no "enforce[ment] in good faith", and the evidence is everywhere. The Patriot Act is used domestically for any and every type of law enforcement investigation, far beyond what it was supposedly intended to be.[0] We've seen civil forfeiture become essentially a license to steal for LE agencies.[1] The government has stretched the meaning of the "exceeds authorization" component of the CFAA to the point of being almost meaningless.[2]

The point is this: the natural tendency of government is to stretch any power it is granted to the absolute max. We have reached a point that an assumption that government will exercise enforcement in "good faith" is simply naive. I assert that there is little evidence to the contrary.

[0] [http://www.washingtonpost.com/blogs/worldviews/post/patriot-...](http://www.washingtonpost.com/blogs/worldviews/post/patriot- act-used-to-fight-more-drug-dealers-than- terrorists/2011/09/07/gIQAcmEBAK_blog.html)

[1] [http://www.newyorker.com/magazine/2013/08/12/taken](http://www.newyorker.com/magazine/2013/08/12/taken)

[2] [http://www.justice.gov/criminal/cybercrime/docs/ccmanual.pdf](http://www.justice.gov/criminal/cybercrime/docs/ccmanual.pdf)

<comment><USER21> I think there might be different definitions of "enforcement in good faith" here. Your perspective, if I understand it correctly, is "The purpose of this law was presented as fighting terrorism and now it's being used for other purposes, which constitutes bad faith enforcement".

Another perspective is, "Law enforcement isn't doing anything that it shouldn't be doing, therefore they aren't acting in bad faith". Whether they're going after terrorists or drug dealers or money launderers, it's all the same to many (if not most) people. As long as there's no evidence that government officials are abusing the provisions of the PATRIOT Act to settle personal scores or persecute those with unpopular beleifs, most people will see them as acting in good faith. This assumes that actions taken are within a reasonable interpretation of the letter of the law, of course.

I get where you're coming from, or at least I think I do. I just don't think that the issue is so black and white. This may be a case of "The current government isn't doing what I want it to do" as opposed to "We should change the way that the laws are written". And the solution to that is pretty simple: Vote.

<comment><USER22> The fact is it is being used to persecute people with unpopular beliefs. The evidence is taken out of context or completely false. You just hear very little about its misuse because poor, defenseless, innocent people are targeted. They are not obligated to present the court with information that is true.

</comment></comment></comment></comment><comment><USER23> > this executive order [does not] target the legitimate cybersecurity research > community or professionals who help companies improve their cybersecurity

Non-story, it's not targeted so I don't see why anyone would be against this unless maybe they are racist or love terrorism or something.

<comment><USER24> If there was any genuine interest in making US systems more secure they would be more worried about making sure those systems don't succumb so easily to arbitrary strings of bytes sent over the network. The EO is completely pointless and toothless for any purpose BUT gaining an upper hand on legitimate security researchers.</comment></comment>


Ask HN: What design services have you had luck with? - <AUTHOR> A fellow developer and I are about to start working on a new Web App in our free-time, and I wanted to use a design service to expedite the process.
If you have used a design service before: what was the service and would you recommend it? Any tips or things I could personally do to get more out of the service? All feedback is appreciated!
I have been lurking on this site for around two years now and this is my first post, hooray! :D <comment><USER2> [https://www.manypixels.co/](https://www.manypixels.co/)

<comment><AUTHOR> This looks promising! Can you share anything about your experience using their services?</comment></comment>


How Purism Avoids Intel's Active Management Technology - <AUTHOR> https://puri.sm/philosophy/how-purism-avoids-intels-active-management-technology/ <comment><USER2> And avoids being able to use ECC memory. (side effect of processors that don't support vPro).

Another niche that AMD could fill if they were thinking about it.

<comment><USER3> AMD has their own version of AMT (which is actually even worse to some extent).

Also the CPUs they are using do support vPro so I don't know what are they even talking about.

vPro isn't restricted to AMT it includes VT, TXT and virtually every thing a modern CPU has to support.

<comment><USER4> AMD has their own version of AMT? (remember that I am talking about actual network access.)

<comment><USER3> Yes it's called DASH, it was broken from day one and the spec hasn't been updated for about 7 years but it's still there.

[https://www.amd.com/Documents/out-of-band-client- management-...](https://www.amd.com/Documents/out-of-band-client-management- overview.pdf)

[https://m.youtube.com/watch?v=39XAMP73MiQ](https://m.youtube.com/watch?v=39XAMP73MiQ)

Had fun with some of the DMTF tools on a el cheapo AMD apu netbook/mini laptop because unlike Intel AMD doesn't even disables remote management to force corporate clients to pay extra.

</comment></comment></comment></comment><comment><USER5> And does not matter, because people who fear of being targeted by ME are not the people who are the marketing target of ME.

</comment><comment><USER6> And this does not matter since ME backdoor is still operational.</comment>


Java One Liner - Reading a Text File At Once - <AUTHOR> http://blog.srikanths.net/2008/06/java-one-liner-reading-text-file-at.html <comment><USER2> Ahahahah... Snippet from a comment:

"This beats perl by long shot:

Java: FileUtil.getContents("filename") // short but tells you what it does

Perl: <> # yea I know what it does, but really, do you need a non-intuitive built-in operator? And besides this only works for reading from the command line"

It seems that some people are so intent on never learning new things or adopting different languages that they will say "beats by a long shot" when they should say "still doesn't even come close to".

<comment><USER3> I'm always amused when someone uses the word "intuitive" to mean "familiar to me".</comment></comment>