Forgot your password?

typodupeerror

Comment: Putting PR Men in Charge (Score 5, Insightful) 83

by ObsessiveMathsFreak (#44007333) Attached to: UK Government 'Muzzling' Scientists

This is what happens when you put professional spinmeisters in charge of professional workers: Dysfunction.

Imagine putting a PR team in charge of the Doctors dealing with an epidemic. A doctor would like to announce quarantine measure, or tell people the full risks, or advise those who are sick, etc. If you had a PR man in charge, the whole epidemic would be treated as a mild flu, no-one would be informed, contagion would spread rapidly and thousands would die. "No matter", says the PR man, "We can spin that too.". But this misses the point.

If you allow spin and the press office to dictate the running of an organisation, then the organisation effectively will not run at all. No professional can work properly with an unrelated lay person getting in his way 24/7.

It's time to call PR men what they really are: Political Officers.

Comment: Re:Ours to lose (Score 1) 327

Or maybe it has more to do with this: http://canadafreepress.com/index.php/article/55749

I think that this was all started by the Town hall protests, more specifically by the administration's reaction to it.

Shortly after the town hall meetings, and I think the birther campaigns, the Obama administration basically went on the offensive. They openly stated that they were going to call out and not stand idly by when similar things happened. The link, if it is true, sounds like an extension of that using the new Prussian apparatus set up over the last decade.

+ - Irish SOPA used to block Pirate Bay Access. ISPs roll over.

Submitted by ObsessiveMathsFreak
ObsessiveMathsFreak writes "Ireland's own SOPA Act has finally struck home. Today, the Irish High Court ordered all ISPs to begin censoring the The Pirate Bay. After earlier attempts were struck down, this case was brought by EMI, Sony, Warner Music and Universal music under new copyright laws brought in last year. This follows the largest ISP Eircom already having voluntarily blocked the Pirate Bay after previous legal action. Despite some early indications that some ISPs would appeal the decision, it now appears that like Eircom, they have quietly given up. Pity; IT was one of the few industires Ireland was getting right."

Comment: Re:Sad, but can Greece afford it? (Score 1) 228

by ObsessiveMathsFreak (#43984695) Attached to: Greek Government Abruptly Shuts Down State Broadcaster

Granted the government's self-interest is to spin this story in their favour, but unless they are lying, given the fact that there are more urgent public sector needs that need to be met (eg. hospitals, food kitchens etc) the reasons they gave seem fairly reasonable in the circumstances.

There's nothing reasonable about pulling the plug on a national broadcaster, without notice, in the middle of the night, and turfing every employee out unilaterally onto the street. This is industrial relations amateur hour.

The guys in charge of Greece have no idea what they are doing. None whatsoever. The same could be said for most western government. The only things these guys know how to do right is overpay themselves.

+ - Death of Trees Correlated with Human Cardiovascular & Respiratory Disease->

Submitted by eldavojohn
eldavojohn writes "PBS's NewsHour interviewed Geoffrey Donovan on his recent research published in the American Journal of Preventative Medicine that noted a correlation between trees (at least the 22 North American ash varieties) and human health: 'Well my basic hypothesis was that trees improve people's health. And if that's true, then killing 100 million of them in 10 years should have an effect. So if we take away these 100 million trees, does the health of humans suffer? We found that it does.' The basis of this research is Agrilus planipennis, the emerald ash borer, which has systematically destroyed 100 million trees in the eastern half of the United States since 2002. After accounting for all variables, the research found that an additional 15,000 people died from cardiovascular disease and 6,000 more from lower respiratory disease in the 15 states infected with the bug compared with uninfected areas of the country. While the exact cause and effect remains unknown, this research appears to be reinforcing data for people who regularly enjoy forest bathing as well as providing evidence that the natural environment provides major public health benefits."
Link to Original Source

Comment: If Life Wasn't So Busy, My Own (Score 5, Informative) 334

by eldavojohn (#43973481) Attached to: Slashdot Asks: How Will You Replace Google Reader?

How Will You Replace Google Reader?

(Disclaimer: I'm going to use the term 'bandwidth' universally instead of the more correct 'latency' or 'throughput' so normal people can hopefully understand this post) The biggest problem I have with every alternative I have tried is that they are built with the most annoying design flaws. They are so painful to me that I am certain these flaws will be look back upon as the geocities of our modern day web development.

When I fire up an alternative, the responsiveness that was in Google Reader just isn't there. And it always seems like the alternatives require you to hit "refresh" on their interface and then what happens? It apparently makes a call out to every single RSS feed to get updates. On the surface this may seem like standard HTTP way of thinking about things. But it makes for a shit user experience. I have thousands of RSS feeds. Thousands. And if I hit refresh in this paradigm, my browser makes 1,000+ HTTP GET requests. It's not a lot of data but if even one of those requests is slow, it's usually blocking on ceding control back to me.

So let's iterate improvements on here that will get us back to Google Reader style responsiveness, shall we? Well, one of the simplest improvements I can see is to do these requests asynchronously with nonblocking web workers. You can attach each of them to the div or construct that each feed is displayed in and only have them work when that feed is visible (for instance if I am collapsing/expanding folders of feeds). You can grey out the feed until the request comes back but if another request returns first, it is parsed and inserted and activated to my vision. That way if cnn.com comes back faster than NASA's Photograph of the Day, I can read while waiting for my images.

But the core problem is that I'm on my home computer on a residential cable modem and, let's face it, Cox sucks. So what I think Google was doing was sacrificing their bandwidth to actually "reverse" the request from client to server. And, in doing so, they could package up all your updates and ship them out in one request (probably compressed). So, this is how I would approach that. Instead of doing a heart beat HTTP GET to check for RSS updates, I'd build a WebSocket and instead of requesting information, the client (browser) would be listening for information. The event/listener paradigm here would save both the user and the RSS host a lot of bandwidth but it would cost the host of the feed reader service some of that bandwidth (although much less). So basically the client JavaScript would load the page just like normal but instead of continually sending HTTP GET requests, a WebSocket would merely inform the server which feeds are active and listen for updates coming in from the server.

On the downside, this greatly complicates the server side. You need to have one be-all end-all "cache" or storage of all incoming feeds that any user is subscribed to. And for each of these feeds, you need to have a list of the users subscribed to it. And now your server will need to maintain the HTTP GET requests to cnn.com and NASA in order to get updates. When it gets an update, there's two ways you could handle it (user queues are complicated so I won't suggest that) but the most basic way is to send it right out to everyone on that subscription list who has an active WebSocket session established with their account. If a new WebSocket session is established, they simply get the last N stories from their subscriptions (Google included pagination backwards binned by time). To alleviate even more bandwidth from you, you could store it on the client side with HTML5 Web Storage and then the first thing the Web Socket does is find the last date on the last stored element and send that across to the server to establish the session. The server responds with any updates past that time. And from there your WebSocket is merely listening and inserting elements into the page when they arrive.

Of course, after you valiantly save your RSS providers from death by a thousand cuts, you yourself face that same fate. And now you know why Google scheduled a turn off of Reader ...

Comment: Enough with the toy languages like C & C++ (Score 5, Insightful) 72

by eldavojohn (#43965071) Attached to: Book Review: Core HTML5 Canvas

It's time for people to stop with this pretending to write computer games nonsense.

HTML5 is not a suitable development environment. Javascript is not a suitable development environment. Your web browser is not a suitable development environment. HTML5 is vaporware. HTML is designed to display TEXT.

Please re-read those sentences until you get it through your head. If you want to write a computer game, start with a real programming language:

1. C 2. C++

I recommend C so you don't get distracted by all the horse**** theory around OOP.

If you need a graphics engine, fine. Get one. Then code the game in a real development environment on a real computer (not a fiddly mobile device) on the metal. It will be hard, but the results will be worth it. If you can't bring yourself to do this, then you have no business programming or writing computer games.

P.S. I'm not interested in Javascript DOOM or whatever the "gew-gaw of the week" is, and I've been programming computers for 37 years, so I'm not interested in your tech credentials either. Either code the game or don't code the game, but knock it off with this artificial development nonsense.

That is all.

It's time for people to stop with this pretending to write computer games nonsense.

C/C++ is not a suitable development environment. VI is not a suitable development environment. Emacs is not a suitable development environment. C++14 is vaporware. C++ is designed to focus on OBJECTS, not GAMES.

Please re-read those sentences until you get it through your head. If you want to write a computer game, start with a real instruction set:

1. ARM (ARMv7 not ARMv8)
2. x86-64

I recommend ARM so you don't get distracted by all the horse**** bloat around CISC.

If you need a punch card reader, fine. Get one. Then code the game on a real ENIAC (not a fiddly PC) in the vacuum tubes. It will be hard, but the results will be worth it. If you can't bring yourself to do this, then you have no business programming or writing computer games.

P.S. I'm not interested in C++ OOP or whatever "Stroustrup's latest fly-by-night language" is, and I've been programming computers for 1,337 years, so I'm not interested in your tech credentials either. Either code the game or don't code the game, but knock it off with this artificial C/C++ development nonsense.

That is all.

+ - Book Review: Core HTML5 Canvas->

Submitted by eldavojohn
eldavojohn writes "Core HTML5 Canvas is a book that focuses on illuminating HTML5 game development for beginning and intermediate developers. While HTML and JavaScript have long been a decent platform for displaying text and images, Geary provides a great programming learning experience that facilitates the canvas element in HTML5. In addition, smatterings of physics engines, performance analysis and mobile platform development give the reader nods to deeper topics in game development.

author David Geary
pages 723 pages
publisher Prentice Hall
rating 9/10
reviewer eldavojohn
ISBN 9780132761611
summary An introduction to game development in HTML5’s canvas that brings the developer all the way up to graphics, animation and basic game development.

This book is written with a small introduction to HTML and JavaScript. While Geary does a decent job of describing some of those foundational skill sets, I fear that a completely novice developer might have a hard time getting to the level required for this text. With that in mind, I would recommend this book for people who already have at least a little bit of HTML and JavaScript development in their background. This book may also be useful to veteran developers of an unrelated language who can spot software patterns easily and aren't afraid to pick up JavaScript along the way. You can read all of Chapter One of the book here if you want to get a feeling for the writing. Geary also has sample chapters available on his site for the book, corehtml5canvas.com and maintains the code examples on Github. If you already write games, this book is likely too remedial for you (especially the explanations of sprites and collision detection) and the most useful parts would be Geary's explanation of how to produce traditional game elements with the modern HTML5 standards.

I have very few negative things to say about this text – many of which may be attributed to personal preferences. This book is code heavy. It starts off with a sweet spot ratio for me. I found I spent about twenty to thirty percent of my time scanning over HTML and JavaScript snippets inserted occasionally into passages. However, by the last chapters, I found myself poring over lengthier and lengthier listings that made me feel like I was spending sixty to seventy percent of my time analyzing the JavaScript code. To be fair, the author does do a good job of simply referencing back to concepts learned in other chapters but I wouldn't mind a re-explanation of those topics or a more in depth analysis of how those concepts interoperate. I also feel that it is risky to put so much code into print as that greatly impacts the shelf life of an unchanging book. The book itself warns on page 51 that toBlob() was a new specification added to HTML5 between writing the book and the book being published. I feel like this would warrant much more English explaining what you're accomplishing and why so that the book does not age as much from being tightly coupled to a snapshot of the specifications.

The code listings in this book are wonderfully colored to indicate quickly to the eye what part of the JavaScript language each piece is. I'm not sure how many copies suffer from this but my book happened to have a problem on some of the pages whereby the comprising colors did not line up. Here is a good example and a bad example just a few pages apart.

This was infrequent but quite distracting as the code became more and more predominant. Lastly, Geary briefly introduces the reader to amazing performance tools (jsPerf in Chapter 1 and again Browserscope in Chapter 4) early on and demonstrates how to effectively exercise it on small pieces of JavaScript. In the particular example he shows how subtle differences in handling image data can affect the performance inside different browsers (even different versions of the same browser as I'm sure the JavaScript engines are repeatedly tweaked). Since games are always resource intensive, I wondered why the author didn't take these examples to the next level and show the reader how to write unit tests (not really covered in the book). That way each of these functions could be extracted to a common interface where it would be selectively chosen based on browser identification. While this might be unnecessary for images, it would be a nod toward addressing the long pole in the tent when you look to squeeze cycles out of your code. Oddly, as more concepts are established and combined, these performance exercises disappear. I understand this book was an introduction to these side quests with a focus on game development but this was one logical step I wish had been taken further (especially in Chapter 9: The Ungame).

About a year ago, I started a hobby project to develop a framework for playing cards in the browser on all platforms. The canvas element would be the obvious tool of choice for accomplishing this goal. Unfortunately I began development using a very HTML4 attitude with (what I now recognize) was laughable resource management. This book really helped me further along in getting that hobby project to a more useable state.

The first chapter of the book introduces the reader to the basics of HTML5 and the canvas element. The author covers things like using clientX and clientY for mouse events instead of x and y. A simple clock is built and shows how to correctly use the basic drawing parts of the HTML5 specification. For readers unfamiliar with graphics applications, a lot of ground is covered on how you programmatically start by constructing an invisible path that will not be visually rendered until stroke() or fill() is called. The chapter also covers the basic event/listener paradigm employed by almost anything accepting user input. Geary explains how to properly save and restore the surface instead of trying to graphically undo what was just done.

An important theme through this book is how to use HTML elements alongside a canvas. This was one of the first follies of my “everything goes in canvas” attitude. If you want a control box in your application, don't reinvent the partially transparent box with paths and fills followed by mouse event handling over your canvas (actually covered in Chapter 10) – simply use an HTML div and CSS to position it over your canvas. Geary shows how to do this and would have saved me a lot of time. Geary discusses and shows how to manage off-screen canvases (invisible canvases) in the browser which comes in mighty handy when boosting performance in HTML5. The final parts of Chapter One focus on remedial math and how to correctly handle units of measure when working in the browser.

Chapter Two shows the reader how to build a rudimentary paint application with basic capabilities. It does a great job of showing how to expand on the basic functions provided by HTML5 and covers a little bit of the logic behind the behavior. Geary goes so far as to show the reader how to extend some of the core components of HTML5 like CanvasRenderingContext2D with an additional function. He also cautions that this can lead to pitfalls in JavaScript. This chapter does an excellent job of exploiting and enumerating core drawing functionality to achieve the next level in using these lines and objects for a desired user effect. Prior to reading this chapter, I hadn't viewed clip() in the correct light and Geary demonstrates the beginnings of its importance in building graphics. In Chapter Three, text gets the same extensive treatment that the basic drawing elements did in Chapter Two. In reading this chapter, it became apparent hat HTML5 has a lot of tips and tricks (perhaps that comes with the territory of what it's trying to achieve) like you have to replace the entire canvas to erase text. Being a novice, I'm not sure if the author covered all of such things but I was certainly appreciative for those included.

Chapter Four was an eye opener on images, video and their manipulation in canvas. The first revelation was that drawImage() can also render another canvas or even a video frame into the current canvas. The API name was not indicative to me but after reading this chapter, it became apparent that if I sat down and created a layout of my game's surface, I could render groups of images into one off-screen canvas and then continually insert that canvas into view with drawImage(). This saved me from considerable rerendering calls. The author also included some drag and drop sugar in this chapter. The book helped me understand that sometimes there are both legacy calls to old ways of doing things and also multiple new ways to accomplish the same goal. When you’re trying to develop something as heavy as a game, there are a lot of pitfalls.

Chapter Five concentrates on animations in HTML5 and first and foremost identifies a problem I had struggled with in writing a game: don’t use setInterval() or setTimeout() for animations. These are imprecise and instead the book guides the reader with instructions on letting the browser select the frame rate. Being a novice, the underlying concepts of requestAnimationFrame() had eluded me prior to reading this book. Geary’s treatment of discussing each browser’s nuances with this method may someday be dated text but helped me understand why the API call is so vital. It also helps you build workarounds for each browser if you need them. Blitting was also a new concept to me as was the tactic of double buffering (which the browser already does to canvas). This chapter is heavy on the hidden caveats to animation in the browser and builds on these to implement parallax and a stopwatch. The end of this chapter has a number of particularly useful “best practices” that I now see as crucial in HTML5 game development.

Chapter Six details sprites and sprite sheets. Here the author gives us a brief introduction to design patterns (notably Strategy, Command and Flyweight) but it’s curious that this isn’t persisted throughout the text. This chapter covers painters in good detail and again how to implement motion and timed animation via sprites with requestNextAnimationFrame(). This chapter does a great job of showing how to quickly animate a spritesheet.

Chapter Seven gives the user a brief introduction to implementing simple physics in a game engine like gravity and friction. It’s actually just enough to move forward with the upcoming games but the most useful section of this chapter to me was how to warp time. While this motion looks intuitive, it was refreshing to see the math behind ease-in or ease-out effects. These simple touches look beautiful in canvas applications and critical, of course, in modeling realistic motion.

Naturally the next thing needed for a game is collision detection and Chapter Eight scratches the surface just enough to build our simple games. A lot of fundamental concepts are discussed like collision detection before or after the collision happens. Geary does a nice job of biting off just enough to chew from the strategies of ray casting, the separating axis theorem (SAT) and minimum translation vector algorithms for detecting collisions. Being a novice to collision detection, SAT was a new concept to me and I enjoyed Geary’s illustrations of the lines perpendicular to the normal vectors on polygons. This chapter did a great job of visualizing what the code was achieving. The last thing this chapter tackles is how to react or bounce off during a collision. It provided enough for the games but it seemed like an afterthought to collision detection. Isn’t there a possibility of spin on the object that could influence a bounce? These sort of questions didn’t appear in the text.

And Chapter Nine gets to the main focus of this book: writing the actual game with all our prior accumulated knowledge. Geary calls this light game engine “the ungame” and adds things like multitrack sound, keyboard event handling and how to implement a heads-up display to our repertoire. This chapter is very code heavy and it confuses me why Geary prints comments inlined in the code when he has a full book format to publish his words in. The ungame was called as such because it put together a lot of elements of the game but it was still sort of missing the basic play elements. Geary then starts in on implementing a pinball game. It may sound overly complicated for a learning text but as each piece of the puzzle is broken down, the author manages to describe and explain it fairly concisely. While this section could use more description, it is basically just bringing together and applying our prior concepts like emulating physics and implementing realistic motion. The pinball board is merely polygons and our code there to detect collisions with the circle that is the ball. It was surprisingly how quickly a pinball game came together.

Chapter Ten takes a look at making custom controls (as mentioned earlier about trying to use HTML when possible). From progress bars to image panners, this chapter was interesting and I really enjoyed the way the author showed how to componentize and reuse these controls and their parts. There’s really not a lot to say about this chapter, as you may imagine a lot of already covered components are implemented in achieving these controls and effects.

Geary recognizes HTML5’s alluring potential of being a common platform for developing applications and games across desktops and mobile devices. In the final chapter of the book, he covers briefly the ins and outs of developing for mobile — hopefully without having to force your users to a completely different experience. I did not realize that native looking apps could be achieved on mobile devices with HTML5 but even with that trick up its sleeve, it’s hard to imagine it becoming the de facto standard for all applications. Geary appears to be hopeful and does a good job of getting the developer thinking about the viewport and how the components of their canvas are going to be viewed from each device. Most importantly, it’s discussed how to handle different kinds of input or even display a touch keyboard above your game for alphabetic input.

This was a delightful book that will help readers understand the finer points of developing games in HTML5’s canvas element. While it doesn’t get you to the point of developing three dimensional blockbuster games inside the browser, it does bite off a very manageable chunk for most readers. And, if you’re a developer looking to get into HTML5 game design, I heavily recommend this text as an introduction."

Link to Original Source

Comment: Re:US Epic fail (Score 1) 266

by hey! (#43957397) Attached to: Decommissioning San Onofre Nuclear Plant May Take Decades

It's not fear of nuclear power that makes it uneconomical. It's cheap fossil fuels. Back in the 70s it was the Saudis opening the oil spigot; today it's fracking natural gas and of course coal.

Which is not to say irrational fear hasn't created nuclear problems -- particularly when it comes to developing long term storage facilities for high level radioactive waste. We also give fossil fuels a break on externalized costs because we're familiar with the and therefore fear them less than we probably ought. But still, it's hard to supplant a mature, entrenched, *cheap* technology.

Comment: Re:Definitions (Score 1) 858

by hey! (#43957031) Attached to: NSA WhistleBlower Outs Himself

Well, it depends. You have to look at each situation individually to see what is at stake. If you know that Anne Frank's family is hiding in the office annex, you obviously keep your mouth shut.

In a case like this, it's important to remember that civil disobedience is most effective when it forces the government to mete out a wildly unpopular punishment. What the government has done is bound to be extremely unpopular because it has come perilously close to passing a secret law.

People think they have fourth amendment protections for most of this data, but long established precedent (Smith v. Maryland) is that there is no Constitutional expectation of privacy for metadata on phone calls. When Congress weakened *statutory* protections against collecting call metadata, American citizens *believed* their calling data was still protected by the Constitution. Nobody has bothered to disabuse them of this idea; not Congress (who despite their current posturing passed the law and authorized the program) nor the Obama administration (their posturing on "transparency" and "accountability" notwithstanding). They knew that the majority of Americans had no idea the changes in the law technically allowed the government to run a program like PRISM.

The exposure of this bit of flim-flammery makes Snowden standing up and outing himself incredibly powerful. His doing that means that this issue will *not* die down anytime soon. Look at how long the Bradley Manning case has dragged on, and *this* one, rightly or wrongly, may prove to be far more powerful in the public imagination. I think Snowden might have been morally justified in laying low if he thought he could get away with it, but his outing of himself will keep this issue alive through the next election cycle at least. That could deal a far more serious blow to the PRISM program than quietly leaking it's existence. The cost of that greater impact is that Snowden definitely loses his job, and he faces prosecution and legal punishments.

Comment: Re:Modern Jesus (Score 1) 858

by ObsessiveMathsFreak (#43957011) Attached to: NSA WhistleBlower Outs Himself

No. The change in America following the Sep 11th attacks was only loosely related to previous Cold War policies. America was in many ways demilitarising and advancing throughout the pst Soviet Union 1990s.

Then Sep 11th came, and the USA went into a supercharged spiral of descent, economically, legally, politically and probably culturally. Like a traumatised patient inflicting self harm, the US continues to tear at the fabric of its own national identity in response to the attacks. I don't think it will stop until the patient is dead, or practically so. Madness does not follow reason.

Comment: Re:email leak (Score 2, Insightful) 474

OK, now you are in a position where the burden of proof is on you.

It's legitimate to look at somebody's evidence and say, "it doesn't convince me." It's sometimes *also* legitimate to say "I've seen enough evidence to convince myself beyond a reasonable doubt, so I won't bother thinking about your evidence; otherwise you'd have to take the time to examine the workings of every proposed perpetual motion machine.

What you can't do is say, "I'll dismiss your evidence because there's a possibility you have a conflict of interest." Everyone *always* has a vested interest in any position they've taken in the past. If you go there, if you call a man a liar because he has stated a professional opinion you disagree with, it's *your* responsibility to show evidence that lying has taken place. If you can't, STFU.

Comment: Pretty Sure The Onion Got It Right (Again) (Score 2, Informative) 103

by eldavojohn (#43940129) Attached to: Google Loves <em>The Internship</em>; Critics Not So Much
I'm pretty sure The Onion hit the nail on the head (as well as their actual review of it).

But this is coming from someone who's probably going to see Frances Ha tonight and is still trying to get his hands on a copy of Incendies so if you want to laugh and don't want to have to think ... watch it make millions.

"Most people would like to be delivered from temptation but would like it to keep in touch." -- Robert Orben

Working...