data

fMRI software bugs upend years of research

I’ve seen several articles about major software bugs (and a lack of testing) recently, and one of them is related to MRI/fMRI image processing. From this article at theregister.co.uk:

When you see a claim that “scientists know when you're about to move an arm: these images prove it”, they're interpreting what they're told by the statistical software.

A whole pile of “this is how your brain looks like” fMRI-based science has been potentially invalidated because someone finally got around to checking the data.

Always visualize data alvin December 26, 2015 - 7:15pm

I’m sure there must be other ways to mathematically see these differences, but I agree with the general concept that it can be easy to be misled by data. (Image from this Twitter page.)

Haskell: How to extend a base type using data, value constructors, record syntax, and deriving alvin July 27, 2015 - 12:44pm

If you need to have multiple types extend a base type in Haskell, while using the data keyword, and while using Haskell’s record syntax, this approach seems to work:

How to populate static, predefined data in a Map/HashMap in Java

Java FAQ: How do I populate (initialize) a static HashMap in Java?

If you need to initialize/populate a Map/HashMap in Java, the following source code shows the proper syntax:

Share it!

There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.

Android/Java: How to get your app's root data directory alvin February 22, 2015 - 4:58pm

If you ever need to get the root data directory of your Android application (app) from within your Java code, I can confirm that this approach works:

File rootDataDir = getActivity().getFilesDir();

When I log that directory like this:

Log.i(TAG, rootDataDir.toString());

it prints this output for my application:

/data/data/com.alvinalexander.mynewapp/files

where com.alvinalexander.mynewapp is the package name for my new Android app.

Is the "War on Drugs" working?

This article shares the graph shown that says the “War on Drugs” isn’t working. That appears to be true, but unfortunately you can’t really know that it’s true because there is no control group. What I mean is that we have no idea what the drug addiction rate would be like if we had not spent all this money on this so-called war. Maybe the rate would be 1.3%, or maybe it would be 5%; we don’t know.