Posession of child porn is illegal. It doesn't matter how you got it, having it is illegal.
Erm... no.
Here's the relevant UK legislation, the Criminal Justice Act 1988, as amended by various more recent legislation:
160[F1Possession of indecent photograph of child]
(1)[F2Subject to section 160A,] it is an offence for a person to have any indecent photographor pseudo-photograph of a child F3. . . in his possession. (2)Where a person is charged with an offence under subsection (1) above, it shall be a defence for him to prove— (a)that he had a legitimate reason for having the photograph [F4or pseudo-photograph] in his possession; or (b)that he had not himself seen the photograph [F4or pseudo-photograph] and did not know, nor had any cause to suspect, it to be indecent; or (c)that the photograph [F4or pseudo-photograph] was sent to him without any prior request made by him or on his behalf and that he did not keep it for an unreasonable time.
Subsection (2)(c) would appear to apply in this case.
The problem is that retaining a lawyer can be expensive whereas reporting a crime to a police officer is relatively free.
In the UK (where this incident occurred) there are quite a few lawyers who are willing to provide an initial consultation on most matters completely free. If you can't find one of those, a lot of home insurance policies come with access to a free legal helpline, and those helplines can be very informative on most matters.
Legal advice is easy and cheap to come by. Don't let anything put you off getting some.
The last motherboard I purchased, late last year, has 4, and wasn't a *particularly* pricey board (not the cheapest, either, but decidedly midrange). I didn't select it for this feature, but the fact I restricted my search to ATX boards may have helped. I note that most boards sold now seem to be of the smaller deigns, but I like boards with a nice large selection of slots (2 PCIe x16 helps a lot...), so prefer to avoid them.
I recommend NCSA Mosaic—it uses even *less* RAM than Firefox 3.6!
Sorry. Netscape 1.1 all the way for me. I find the support for inline JPGs to be a killer feature -- much better than having to launch them in an external image viewer like I had to with Mosaic, although it did at least support GIFs and PPMs -- and tables are nice too.
The cost of exceeding about 32GB in a single machine starts to get quite high comparitively speaking. 8GB modules cost about 6-7 times what 4GB modules do.
Put another way: for a machine with the most common configuration of 4 DIMM slots, the cost of various amounts of memory (using prices from Crucial's UK web store) is:
Many algorithms can make a tradeoff between memory and higher speed. If the RAM is cheap, why not make that tradeoff?
Because there are cases where RAM isn't cheap. Ones to consider:
- DDR2-based systems. RAM is somewhat more expensive for these, and they might only be about 2-3 years old. - Systems with 4GB or 8GB hard limits. Could be as recent as 4-5 years old. - Other demands on memory usage may reduce the amount available. Machines used for development work may be required to run virtual machines for testing/debugging purposes, reducing available RAM by 4-8GB. With 16GB-limited boards still common, this could be problematic. - Running inside virtual machines, particularly where the size of the VM allocation is constrained by needing to run other memory-intensive applications on the host. 2GB may be somewhere close to a hard limit in cases like this, yet some people do need to do it. - Offices running terminal server installations. The cost of exceeding about 32GB in a single machine starts to get quite high comparitively speaking. 8GB modules cost about 6-7 times what 4GB modules do. If a 32GB machine needs to host 10 terminal server sessions, memory is going to get tight.
Your option 3 is definitely possible, as people have done it, although only WHCL-certified drivers are likely to work once you've done it (a lot of drivers fail when passed addresses beyond 4GB, apparently, which is why MS disabled PAE in consumer versions of Windows).
Perhaps you're just a light browser user? My Chrome 10 instance is currently using 900MB of paged-in RAM from a total allocation of 1.9GB. I have about 20 open tabs, and have had the browser open continuously for about 3 days. I cope on my 2GB machine, but only just. Thinking of getting another 4 perhaps...
did you just compare CCTV inside of stores to CCTV in public spaces... seriously?
You know all those statistics you hear about how many cameras there are in the UK -- originally they said 4.2 million, but more recently that figure has been debunked and replaced with one around 1.5 million -- you do realise they include store cameras, right? In fact, that almost all of them are store cameras.
There are only around 60,000 public cameras in the UK. The largest deployment is London's (10,000 cameras - similar to the size of the deployment in Chicago, with a population less than a quarter the size of London's). The remaining 50,000 are scattered across around 800 smaller deployments. Most towns don't have any.
It's harder to find information on US deployments. Chicago, as mentioned, has about 10,000, with the mayor expressing a desire to "put one on every street corner". New York also has a large deployment (3,000 - larger than any in the UK outside of London). Beyond these, figures become scarce. A number of cities published figures for trial installation sizes in the region of 30-50 cameras, but it isn't clear whether these deployments were increased in size beyond this. It seems likely that there are similar numbers of public cameras in the US versus UK (although probably not on a per-capita basis).
I love my Transformer, but I have to admit that 3:4 makes more sense for tablets.
Not convinced. Because of how I use my tablet, I find the maximum size tablet I can use is constrained by the smaller dimension, not the larger... I can fit an 8" widescreen tablet in my jacket pocket, but only a 7" 4:3. I think the former works better, as I find typing on a 7" screen a little cramped, but the 8" is fine. In fact, I could probably fit a 9" widescreen if I could find one (most manufactures seem to jump from 8.0" up to 9.7" without any sizes inbetween), which would be better still.
I prefer 4:3 for multi-monitor setups. I have three 1600x1200 21" monitors laid out horizontally at work. I like having the consistent resolution so something fits the same regardless of which screen I drag it onto. My workflow wouldn't work so well if the resolutions didn't line up.
You can certainly have multiple widescreen monitors at the same resolution. You may prefer a 4:3 for certain reasons but surely that isn't one of them.
Yes, but you'd have to reduce to just 2 monitors rather than three. In order to avoid losing too much vertical resolution, you'd have to go for 21.5" screens at a minimum (the smallest I can find 1920x1080 support in). OP's current 3 monitor layout takes up about 51" horizontal space. 3 widescreens would need closer to 60", which is likely more space than he has. (More likely than not, he has a 48" desk and has the monitors either overhanging slightly or offset from a straight line to squeeze them in better -- the latter is how I have my 3-monitor setup). OTOH, 2 of them is a significant reduction in screen area from the current situation, unless he upgrades to expensive higher-sized monitors. A pair of 2560x1440 displays would set him back well over $1000 (compared to the ~$300 cost of his current setup), and at 27" each would give him a 47"x13" effective display area (compared to his current 50"x12.5"). He would, admittedly, get a slightly higher resolution display out of it (110DPI rather than his current 95). I'm not convinced a 15% improvement in display density is worth more than tripling the hardware cost.
I'm just not sure who can afford a data plan suitable for that resolution (if such a plan exists).
Come to the UK. We have unlimited data plans available from about £20 per month on SIM-only deals. Double that and you'll get unlimited inclusive calls, too, along with a "free" smartphone that supports wireless tethering. Mobile connectivity's a lot more affordable here.
I just thought root and delete might be easier than making a custom launcher.
Probably not -- deleting the preinstalled apps requires making the nand-flash writable, which is usually a non-trivial operation and which varies from device to device. In some cases it is only viable with a custom OS build. A custom launcher that only launches a sngle predefined app is a 100 line application which will work on all devices.
Wow. Staggering. You are able to predict the way different browsers on different operating systems will work in the near and distant future!
No. I allow my library providers to abstract browser behaviour and trust that if any browser behaves significantly differently in future (notably in this case violating the W3C recommendations for the DOM API) that the library will adjust for this. This is one of the advantages of using the libraries you are arguing against.
You also have an incredible amount of faith in what you termed "acceptance testing" - in other words, let the user (the acceptance tester) catch the error.
Err.. no. By "acceptance testing" I mean an automated test in an environment like Selenium or something similar that is run on every code check-in with all target browsers and which won't allow anyone to make modifications to the code while a test is failing.
You seem to continually getting confused between talking about practices and talking about the specific operations you put in your "elegant" line of code. Who cares what the particular line of code does, I don't. What I am pointing out about your line of code are the bad practices you are exemplifying as "elegant."
While you appear to be making a lot of assumptions about the practices I apply to my work on the basis of a three-line code example which you haven't been able to identify any *actual* problems with, only potential problems that don't apply in the specific circumstances we were discussing. Given this situation the actual operations performed by the code in question seem particularly relevant, as that code is all you have to go on in making your assessment.
And you still haven't justified why you believe any of the following are bad practices:
* use of closures (which, if it is a bad practice, means the entire field of functional programming is apparently doomed to failure) * use of fluent interfaces (which, if it is a bad practice, means that several prominent and well-respected writers on software engineering best practices are completely and utterly wrong) * reuse of behaviours based on html element classes (which, if it is a bad practice, means that the approaches suggested by the W3C among others are at best misguided) rather than methods that rely on modifying programmatic behaviour (e.g. code inheritance).
I'm open to any rational argument. Please, point me in the direction of any such argument, particularly any research papers that justify the notion that these practices result in code which is harder to maintain or reuse than the practices you appear to believe are the only valid way to write software professionally.
You're really not going to be successful trying to argue that making code less testable and maintainable is a good thing
I'm not attempting to argue any such thing. In fact, I'm claiming that:
* my code is just as testable as any equivalent code (I know because I have trivially written tests that ensure that code exactly like this works as specified) * my code is as maintainable (or more so -- the abstraction of DOM operations into a library enables easier maintenance in the event that an issue is identified where some browsers do not correctly support those operations) as any equivalent code that I've seen suggested, including the variations posted in this thread (most of which fail to work on older browsers that are supported perfectly adequately by the code I posted).
The typical OO approach of putting [variables required by a callback function] in an object simply doesn't work properly
Why do they have to be in an object?
Because the environment only provides two viable approaches to passing such values to callback functions:
* fields in an object * values in a closure
and you were objecting to the use of closures, so I assumed you were proposing to use objects in their place. If you have another approach, please enlighten me.
Are you familiar with any other programming environment in a professional capacity? It seems highly doubtful.
Yes. I have programmed professionally in C, Scheme, CMU Common LISP, Perl, C++, Java, C#, PHP and Python.
Have you ever programmed professionally in a functional environment? It seems doubtful, as you don't seem to appreciate the fact that functional languages (of which Javascript is an example) demand a different programming style to traditional imperative languages.
On Android it shouldn't even need a root. Just install a custom launcher app that will only launch the required application. There's even a sample in the SDK that you can use as a starting point.
That works precisely as long as it takes someone to figure out how to boot into safe mode or some other such thing, and bypass the fancy launcher.
Most tablets I've seen have no safe mode. They typically have a recovery mode, but all that allows you to do is reflash the OS from the SD card. If you disable the SD reader, they will be able to achieve nothing with it without physically modifying the hardware. If they're willing to do that, all bets are off.
You can't lock the tablet into a single application without modifying the operating system
Not entirely true. Android, for example, sends a broadcast message whenever the user attempts to switch to the launcher (which is to say, whenever they try to switch away from the current application). You can intercept this and bring your application back to foreground, or restart it if it has exited.
"Economic slavery" is being in a position where you must do something because the cost of not doing it is too high. Note that while most developed countries have a system for paying those who cannot find work a minimum amount of money required to enable them to survive, it is quite frequently the case that either (1) leaving a job voluntarily or (2) refusing a job that you have been offered terminates your entitlement to such handouts. So if you have a job offer in your hand, and no other prospects, "slavery" is not necessarily the wrong term.
Yup, I know where you're coming from, I worked for a (UK) bookshop company which included a similar clause along the lines of "any invention or program you come up with while an employee belongs to us if it is related to the business, whether or not you do it on company time." [...] The clause was changed rather quickly.
Posession of child porn is illegal. It doesn't matter how you got it, having it is illegal.
Erm... no.
Here's the relevant UK legislation, the Criminal Justice Act 1988, as amended by various more recent legislation:
Subsection (2)(c) would appear to apply in this case.
The problem is that retaining a lawyer can be expensive whereas reporting a crime to a police officer is relatively free.
In the UK (where this incident occurred) there are quite a few lawyers who are willing to provide an initial consultation on most matters completely free. If you can't find one of those, a lot of home insurance policies come with access to a free legal helpline, and those helplines can be very informative on most matters.
Legal advice is easy and cheap to come by. Don't let anything put you off getting some.
The last motherboard I purchased, late last year, has 4, and wasn't a *particularly* pricey board (not the cheapest, either, but decidedly midrange). I didn't select it for this feature, but the fact I restricted my search to ATX boards may have helped. I note that most boards sold now seem to be of the smaller deigns, but I like boards with a nice large selection of slots (2 PCIe x16 helps a lot...), so prefer to avoid them.
If you buy your music over the 'net, flac isn't an option
Guess you're not a Nine Inch Nails fan.
He said music. /me ducks
I recommend NCSA Mosaic—it uses even *less* RAM than Firefox 3.6!
Sorry. Netscape 1.1 all the way for me. I find the support for inline JPGs to be a killer feature -- much better than having to launch them in an external image viewer like I had to with Mosaic, although it did at least support GIFs and PPMs -- and tables are nice too.
The cost of exceeding about 32GB in a single machine starts to get quite high comparitively speaking. 8GB modules cost about 6-7 times what 4GB modules do.
Put another way: for a machine with the most common configuration of 4 DIMM slots, the cost of various amounts of memory (using prices from Crucial's UK web store) is:
16GB - £70
32GB - £300
64GB - £1080
128GB (the highest possible) - £8400
Many algorithms can make a tradeoff between memory and higher speed. If the RAM is cheap, why not make that tradeoff?
Because there are cases where RAM isn't cheap. Ones to consider:
- DDR2-based systems. RAM is somewhat more expensive for these, and they might only be about 2-3 years old.
- Systems with 4GB or 8GB hard limits. Could be as recent as 4-5 years old.
- Other demands on memory usage may reduce the amount available. Machines used for development work may be required to run virtual machines for testing/debugging purposes, reducing available RAM by 4-8GB. With 16GB-limited boards still common, this could be problematic.
- Running inside virtual machines, particularly where the size of the VM allocation is constrained by needing to run other memory-intensive applications on the host. 2GB may be somewhere close to a hard limit in cases like this, yet some people do need to do it.
- Offices running terminal server installations. The cost of exceeding about 32GB in a single machine starts to get quite high comparitively speaking. 8GB modules cost about 6-7 times what 4GB modules do. If a 32GB machine needs to host 10 terminal server sessions, memory is going to get tight.
You can use a software ram drive to access memory above the 4GB limit in XP 32-bit. See http://superuser.com/questions/292207/is-there-any-way-to-use-memory-above-3-25gb-using-windows-xp
Your option 3 is definitely possible, as people have done it, although only WHCL-certified drivers are likely to work once you've done it (a lot of drivers fail when passed addresses beyond 4GB, apparently, which is why MS disabled PAE in consumer versions of Windows).
Perhaps you're just a light browser user? My Chrome 10 instance is currently using 900MB of paged-in RAM from a total allocation of 1.9GB. I have about 20 open tabs, and have had the browser open continuously for about 3 days. I cope on my 2GB machine, but only just. Thinking of getting another 4 perhaps...
did you just compare CCTV inside of stores to CCTV in public spaces... seriously?
You know all those statistics you hear about how many cameras there are in the UK -- originally they said 4.2 million, but more recently that figure has been debunked and replaced with one around 1.5 million -- you do realise they include store cameras, right? In fact, that almost all of them are store cameras.
There are only around 60,000 public cameras in the UK. The largest deployment is London's (10,000 cameras - similar to the size of the deployment in Chicago, with a population less than a quarter the size of London's). The remaining 50,000 are scattered across around 800 smaller deployments. Most towns don't have any.
It's harder to find information on US deployments. Chicago, as mentioned, has about 10,000, with the mayor expressing a desire to "put one on every street corner". New York also has a large deployment (3,000 - larger than any in the UK outside of London). Beyond these, figures become scarce. A number of cities published figures for trial installation sizes in the region of 30-50 cameras, but it isn't clear whether these deployments were increased in size beyond this. It seems likely that there are similar numbers of public cameras in the US versus UK (although probably not on a per-capita basis).
Also, transistors don't store anything
http://en.wikipedia.org/wiki/Flash_memory#Principles_of_operation would appear to disagree with you.
And of course games can set monitor to 256 colors - I'm playing Fallout 2 a lot on my Win7.
According to a quick google, Fallout 2 selects a 16-bit colour mode, i.e. 65536 colours.
I love my Transformer, but I have to admit that 3:4 makes more sense for tablets.
Not convinced. Because of how I use my tablet, I find the maximum size tablet I can use is constrained by the smaller dimension, not the larger... I can fit an 8" widescreen tablet in my jacket pocket, but only a 7" 4:3. I think the former works better, as I find typing on a 7" screen a little cramped, but the 8" is fine. In fact, I could probably fit a 9" widescreen if I could find one (most manufactures seem to jump from 8.0" up to 9.7" without any sizes inbetween), which would be better still.
I prefer 4:3 for multi-monitor setups. I have three 1600x1200 21" monitors laid out horizontally at work. I like having the consistent resolution so something fits the same regardless of which screen I drag it onto. My workflow wouldn't work so well if the resolutions didn't line up.
You can certainly have multiple widescreen monitors at the same resolution. You may prefer a 4:3 for certain reasons but surely that isn't one of them.
Yes, but you'd have to reduce to just 2 monitors rather than three. In order to avoid losing too much vertical resolution, you'd have to go for 21.5" screens at a minimum (the smallest I can find 1920x1080 support in). OP's current 3 monitor layout takes up about 51" horizontal space. 3 widescreens would need closer to 60", which is likely more space than he has. (More likely than not, he has a 48" desk and has the monitors either overhanging slightly or offset from a straight line to squeeze them in better -- the latter is how I have my 3-monitor setup). OTOH, 2 of them is a significant reduction in screen area from the current situation, unless he upgrades to expensive higher-sized monitors. A pair of 2560x1440 displays would set him back well over $1000 (compared to the ~$300 cost of his current setup), and at 27" each would give him a 47"x13" effective display area (compared to his current 50"x12.5"). He would, admittedly, get a slightly higher resolution display out of it (110DPI rather than his current 95). I'm not convinced a 15% improvement in display density is worth more than tripling the hardware cost.
I'm just not sure who can afford a data plan suitable for that resolution (if such a plan exists).
Come to the UK. We have unlimited data plans available from about £20 per month on SIM-only deals. Double that and you'll get unlimited inclusive calls, too, along with a "free" smartphone that supports wireless tethering. Mobile connectivity's a lot more affordable here.
I just thought root and delete might be easier than making a custom launcher.
Probably not -- deleting the preinstalled apps requires making the nand-flash writable, which is usually a non-trivial operation and which varies from device to device. In some cases it is only viable with a custom OS build. A custom launcher that only launches a sngle predefined app is a 100 line application which will work on all devices.
Wow. Staggering. You are able to predict the way different browsers on different operating systems will work in the near and distant future!
No. I allow my library providers to abstract browser behaviour and trust that if any browser behaves significantly differently in future (notably in this case violating the W3C recommendations for the DOM API) that the library will adjust for this. This is one of the advantages of using the libraries you are arguing against.
You also have an incredible amount of faith in what you termed "acceptance testing" - in other words, let the user (the acceptance tester) catch the error.
Err.. no. By "acceptance testing" I mean an automated test in an environment like Selenium or something similar that is run on every code check-in with all target browsers and which won't allow anyone to make modifications to the code while a test is failing.
You seem to continually getting confused between talking about practices and talking about the specific operations you put in your "elegant" line of code. Who cares what the particular line of code does, I don't. What I am pointing out about your line of code are the bad practices you are exemplifying as "elegant."
While you appear to be making a lot of assumptions about the practices I apply to my work on the basis of a three-line code example which you haven't been able to identify any *actual* problems with, only potential problems that don't apply in the specific circumstances we were discussing.
Given this situation the actual operations performed by the code in question seem particularly relevant, as that code is all you have to go on in making your assessment.
And you still haven't justified why you believe any of the following are bad practices:
* use of closures (which, if it is a bad practice, means the entire field of functional programming is apparently doomed to failure)
* use of fluent interfaces (which, if it is a bad practice, means that several prominent and well-respected writers on software engineering best practices are completely and utterly wrong)
* reuse of behaviours based on html element classes (which, if it is a bad practice, means that the approaches suggested by the W3C among others are at best misguided) rather than methods that rely on modifying programmatic behaviour (e.g. code inheritance).
I'm open to any rational argument. Please, point me in the direction of any such argument, particularly any research papers that justify the notion that these practices result in code which is harder to maintain or reuse than the practices you appear to believe are the only valid way to write software professionally.
You're really not going to be successful trying to argue that making code less testable and maintainable is a good thing
I'm not attempting to argue any such thing. In fact, I'm claiming that:
* my code is just as testable as any equivalent code (I know because I have trivially written tests that ensure that code exactly like this works as specified)
* my code is as maintainable (or more so -- the abstraction of DOM operations into a library enables easier maintenance in the event that an issue is identified where some browsers do not correctly support those operations) as any equivalent code that I've seen suggested, including the variations posted in this thread (most of which fail to work on older browsers that are supported perfectly adequately by the code I posted).
The typical OO approach of putting [variables required by a callback function] in an object simply doesn't work properly
Why do they have to be in an object?
Because the environment only provides two viable approaches to passing such values to callback functions:
* fields in an object
* values in a closure
and you were objecting to the use of closures, so I assumed you were proposing to use objects in their place. If you have another approach, please enlighten me.
Are you familiar with any other programming environment in a professional capacity? It seems highly doubtful.
Yes. I have programmed professionally in C, Scheme, CMU Common LISP, Perl, C++, Java, C#, PHP and Python.
Have you ever programmed professionally in a functional environment? It seems doubtful, as you don't seem to appreciate the fact that functional languages (of which Javascript is an example) demand a different programming style to traditional imperative languages.
a system meant to buy and sell stock across state and international borders wasn't "interstate commerce"
It isn't. I don't imagine any of that stock ever left the state of New York.
I guess that would probably only work on something less than 3.0, though, since they've added a shortcut on the status bar to launch the Settings app.
I don't have a honeycomb/ICS device to try this on, but wouldn't
public boolean onKeyDown (int keyCode, KeyEvent event) {
if (keyCode == KEYCODE_SETTINGS) return true;
return false;
}
cause this button to stop working?
On Android it shouldn't even need a root. Just install a custom launcher app that will only launch the required application. There's even a sample in the SDK that you can use as a starting point.
That works precisely as long as it takes someone to figure out how to boot into safe mode or some other such thing, and bypass the fancy launcher.
Most tablets I've seen have no safe mode. They typically have a recovery mode, but all that allows you to do is reflash the OS from the SD card. If you disable the SD reader, they will be able to achieve nothing with it without physically modifying the hardware. If they're willing to do that, all bets are off.
You can't lock the tablet into a single application without modifying the operating system
Not entirely true. Android, for example, sends a broadcast message whenever the user attempts to switch to the launcher (which is to say, whenever they try to switch away from the current application). You can intercept this and bring your application back to foreground, or restart it if it has exited.
"Economic slavery" is being in a position where you must do something because the cost of not doing it is too high. Note that while most developed countries have a system for paying those who cannot find work a minimum amount of money required to enable them to survive, it is quite frequently the case that either (1) leaving a job voluntarily or (2) refusing a job that you have been offered terminates your entitlement to such handouts. So if you have a job offer in your hand, and no other prospects, "slavery" is not necessarily the wrong term.
Yup, I know where you're coming from, I worked for a (UK) bookshop company which included a similar clause along the lines of "any invention or program you come up with while an employee belongs to us if it is related to the business, whether or not you do it on company time." [...] The clause was changed rather quickly.
The clause was changed because it was unenforceable. See: http://www.dyoung.com/article-ownership (especially the last paragraph).