Slashdot Mirror


User: yurikhan

yurikhan's activity in the archive.

Stories
0
Comments
57
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 57

  1. Re:Bad reason on JSON Feed Announced As Alternative To RSS (jsonfeed.org) · · Score: 1

    The problem with RSS/Atom is not in the XML. It is in the HTML that is embedded within.

    RSS was not designed for content to be embedded in it. It had a short-plain-text-only element. People started putting HTML in there. It broke XML structure. People started escaping that HTML. RSS 2.0 made that practice official.

    The designers of Atom looked at RSS and saw that it was bad. They added an element for the content and specified that it can contain plain text, escaped HTML, or include XHTML as a sub-schema. The intent was, probably, that all good people will write valid HTML and serialize it as XHTML. It never took off. People are still writing invalid HTML and escape it in their feeds.

    And that is the problem. People who are likely to write blogs are also likely to write invalid HTML. That is a basic fact and cannot be changed by choosing a different container.

  2. Re:Bad reason on JSON Feed Announced As Alternative To RSS (jsonfeed.org) · · Score: 1

    > how do you store binary data?

    You don’t.

    Seriously, there is not much reason to want to store binary data in JSON. As a minimum, you want to tag that blob with a MIME type, so that other code will know what to do with it. And as soon as you do, you can represent that with a data: URI. Which gives you a choice of two serialization modes, quoted-printable and base64, both well specified and documented.

  3. abuse that portal devices go through on Microsoft Wants You To Care For Your Surface Like a 'Luxury' Handbag (theverge.com) · · Score: 1

    Do not touch the operational end of The Device. Do not look directly at the operational end of The Device. Do not submerge The Device in liquid, even partially. Most importantly, under no circumstances should you ^^/-#+$*./#^+\?

  4. Re:Tutorials do not write bad code on Flawed Online Tutorials Led To Vulnerabilities In Software (helpnetsecurity.com) · · Score: 1

    Imagine you’re writing a tutorial on, I don’t know, getting a list of repositories in a GitHub account and dumping their names and descriptions to the terminal. At the core, it is a single HTTP request: GET /users/:username/repos. You could probably trim the whole thing down to a shell one-liner.

    But no, you want good practices. Let’s do it.

    Our script will accept a user name and a configuration option for the API endpoint; that means some CLI argument parsing and --help handling. Check that the API root is a valid IRI. Validate and/or escape the user name for use in a URL. Handle DNS resolution errors. Handle TCP connection errors. Handle timeouts. Check if the HTTPS certificate presented by the alleged GitHub is well-formed, signed by a trusted CA, strong enough, valid for key exchange, valid at this point in time. Constant vigilance! Send the request. Check that the first line of the response is valid as an HTTP status line. Handle redirects. Not that there are any in the normal case, but you can never be sure! Be careful to not get stuck in infinite redirects. Check that the final status code is 200. Check that Content-Type is application/json (case-insensitively, after trimming any whitespace where allowed by HTTP spec and ignoring any unknown MIME type parameters). Parse the response, handle any UTF-8 decoding errors, handle any JSON parsing errors. Validate the parsed response against JSON Schema, handle any validation errors. Do not forget to sanitize the name and description against possibly malicious terminal control sequences before printing! Be sure to return a zero exit code in case of success and a non-zero in case of any error.

    What was that tutorial about again?

  5. Tutorials do not write bad code on Flawed Online Tutorials Led To Vulnerabilities In Software (helpnetsecurity.com) · · Score: 2

    Tutorials do not write bad code. People write bad code.

    A tutorial’s purpose is not to follow good practices in all aspects; such a tutorial would be unreadable. A good tutorial focuses on the one aspect being demonstrated, and, for the sake of exposition, intentionally neglects all other aspects, including, but not limited to, error handling, separation of responsibilities, access control, injection avoidance, naming, cache invalidation, etc.

    The implicit assumption is always that you will apply good practices that you already know from elsewhere. You get that by (a) reading books (with wider scope than just a tutorial), (b) reading war stories in blogs (where neglecting a good practice led to a horrible vulnerability or a lengthy debugging session), and (c) participating in actual real-world projects collaborating with and learning from more experienced developers.

  6. Re: Number 1 on Researchers Determine What Makes Software Developers Unhappy (vice.com) · · Score: 1

    Prolog does not “do”. It just “is”.

  7. Re: How to do anything in 2017 on Ask Slashdot: How To Get Started With Programming? [2017 Edition] · · Score: 1

    No they didn’t. We write in straigh C++, no “C/” about it.

    This post is about getting started. A novice who thinks C and C++ are the same or similar may accidentally learn the wrong thing.

  8. Re:How to do anything in 2017 on Ask Slashdot: How To Get Started With Programming? [2017 Edition] · · Score: 1

    Please do not talk about "C/C++" as if it were a single language.

    C is one thing. C++ is another thing altogether. In order to write good idiomatic C++, one has to unlearn many habits that are essential to a C programmer.

  9. You would be right if it was a plan to protect the citizens’ privacy.

    However the plan is to put Russia(n government) in a preferential position to violate said privacy.

  10. > seriously, would you want your private information stored on a server in a foreign country?

    YES PLEASE.

    Seriously, would you, as a citizen of the Free Internet, rather have your private information stored on a server in Russia or in a foreign country?

    Thought so.

  11. Re:Didn't you know? on David Pogue Calls Out 18 Sites For Failing His Space-Bar Scrolling Test (yahoo.com) · · Score: 1

    If you don’t have a pointing device, the only thing you need about toolbars is a way to hide them, and that’s what the View menu is for.

  12. Re:aka PgDn "trick" on David Pogue Calls Out 18 Sites For Failing His Space-Bar Scrolling Test (yahoo.com) · · Score: 1

    They work in bash, but it’s a bit ignorant to call them “bash shortcuts”. Rather, they are Emacs shortcuts.

  13. The problem with that graph is that its upper limits are completely unrealistic. 60ft viewing distance, that’s, like, viewing across a hall which is 6 standard dungeon cells wide! (And if you stand a 120in monitor on its corner, it will reach the ceiling.)

    Find the point at 27in (this monitor being discussed), 2.5ft (normal viewing distance for a *computer monitor*). It’s close to the lower edge of the green 8K zone.

  14. Re:Good luck on Sharp Unveils 27-inch 8K 120Hz IGZO Monitor With HDR (monitornerds.com) · · Score: 1

    You’re saying that as if gaming and movies are the only uses for a computer monitor. Or for a computer, for that matter.

  15. Lights in general on Why Sys-Admins Are Disabling The Lights on WiFi Access Points (networkworld.com) · · Score: 2

    The problem is not limited to access points. Power strips, monitors, speakers, keyboards, mice — everything has a LED.

    Some devices have options to turn off the LED when working, but insist on blinking said LED when in standby. Good luck turning your monitor to face the wall so that its blinking LED doesn’t disturb your sleep.

  16. Start by agreeing on a common open federated protocol and common patent-unencumbered codecs for video and audio. Then and only then client and server software will follow.

  17. Re:Hey scientists on Scientists Develop "Paint" To Help Cool the Planet · · Score: 1

    Also, Slashdot, get real and learn not to lose Unicode.

    -32 (resp. -27) degrees Centigrade.

  18. Hey scientists on Scientists Develop "Paint" To Help Cool the Planet · · Score: 1

    ...drop everything you’re doing RIGHT NOW and come here to Siberia. 32C today, 27 this weekend.

  19. Re:Only useful with good eyeballs on 4K Is For Programmers · · Score: 1

    This one is not a ridiculously high resolution monitor. At 3840×2160 39in, it’s just 113dpi, only a bit higher than my 2003 era 20in 1600×1200, or comparable with a 9in 1024×600 ASUS Eee.

    For reference, Your 1280×800 at 20in gives just 75dpi. That’s quite low unless you’re a classic Mac user. (Macs traditionally assumed 72dpi; I don’t know how they work now. Windows, 96dpi in standard font size, 120 in Large Fonts mode. X11, whatever the monitor reports or the user specifies.)

  20. too big on 4K Is For Programmers · · Score: 1

    At that pixel count, I would want it in 15, maybe 20 inches, not 39.

  21. Obligatory non-xkcd link on Ask Slashdot: Prioritizing Saleable Used Computer Books? · · Score: 1
  22. Re:Hmmmm on Ask Slashdot: Wiring Home Furniture? · · Score: 1

    A male-to-male cord seems to be a bad idea. Suppose you plug it into a wall socket before plugging into furniture; then you have an electrocuter device.

    If you are going to need dedicated plugs/sockets for power source, you might as well switch gender on dedicated connectors.

  23. Learn languages that are different on Ask Slashdot: 2nd Spoken/Written Language For Software Developer? · · Score: 1

    Learn a language written in a non-Latin alphabet. Russian, Greek, Armenian. Get to know their historical character encodings — e.g. the Russian had cp866 in the DOS age, windows-1251 in pre-Unicode Windows age, and koi8-r for mail, because it had the desirable property of still being readable when a misconfigured mail server ate all your high bits. Converting between all these and UTF-8 is still a lot of fun.

    Learn a right-to-left language. Hebrew, Arabic. Bonus points for Arabic because it is also a Complex script (has different letter forms depending on position in word). Understand the Unicode RTL algorithm.

    Learn a Turkic language. They have the unique property that make Unicode upper/lowercase transformation language-dependent — namely, the small dotless i and the capital dotted I.

    Learn a language written in a non-alphabetic script. Chinese, Japanese, to a lesser extent Korean. Experience the world of input methods and the pain of entering 4000 different characters with just 106 keys. See it cramped into an 8pt type.

    Learn a language with many grammatical cases (as opposed to 1.5 cases in English). Latin, Russian, Japanese. Understand why one does not simply compose a UI message out of several separate localized strings.

    Learn a language with a different set of plural forms. English has singular and plural. Russian has singular, dual and plural. Japanese has no plural at all, but they have counting suffixes — a strong typing system for numerals.

    Learn a language that has concepts unheard of in English. Japanese has different words and patterns for talking to peers, to subordinates and to superiors, and they use all these three sublanguages on a daily basis.

  24. That’s not piracy on Nokia Engineer Shows How To Pirate Windows 8 Metro Apps, Bypass In-app Purchases · · Score: 1

    If he asked for a trial and was given a fully functional version configured to act like a trial, there’s nothing wrong in reconfiguring it.

  25. Ubuntu on Ask Slashdot: What Distros Have You Used, In What Order? · · Score: 1

    Ubuntu --> Kubuntu -(KDE4 happens)-> back to Ubuntu -(Unity and GNOME3 happen)-> Xubuntu.