News for hackers. Stuff that matters.
Re:Exploring the BBC Micro:bit Software Stack and OS by IanCal on Wednesday November 29, 2017 @07:59AM (#15806402)
I just had a look to see how to build an android app to make a hot/cold beacon finder and where to buy beacons.

You know what? I'm already bored. And that's before I've started trying to install eclipse and what sdks I need and whether to use kotlin and how to setup the right things.

I mean, I found the google docs and one of the first steps is

> Request an OAuth 2.0 Client ID

Great, going to get some young kids excited by explaining what oauth is and how to log into the google developers console.

Next up, what XML you need to know to create an interface and add what threads are and ...

Or:

https://makecode.microbit.org/projects/hot-or-cold

Done.

Re:Exploring the BBC Micro:bit Software Stack and OS by djaychela on Wednesday November 29, 2017 @08:32AM (#15806574)
I think that sums a lot of 'progress' up to me; I've had several abortive attempts to 'get into programming' over the last 20 years or so, and all of them have floundered early on on various pre-requisites which just seemed too much to deal with. I'm now persevering with Python (which seems in some way to suffer less that others, but also because I'm sticking at it this time as I want to change career), but I can remember giving up when it seemed I had to write about 50 lines of code just to get a window up with an OK button. I'm sure the same is true many multiples over with kids, and the micro:bit seems a good solution to that.
Re:Exploring the BBC Micro:bit Software Stack and OS by IanCal on Wednesday November 29, 2017 @08:55AM (#15806741)
If it helps, I've recently started adding more UIs to things and the main way I'm doing it is with web pages.

Easy to make, lots of tutorials, requires another language unfortunately but still a useful skill.

Not always applicable, but can be a good approach.

Best of luck, I know there are some hard steps to take (particularly the stage of "ok I can write code but what can I actually do with it"), but things really build after a while. Oh, and I've been coding for maybe 17 years and

1. I keep writing code that's wrong 2. I get basic things wrong all the time 3. I still have to regularly look things up

My wife is learning to code, and I think she felt these things meant she wasn't doing well at it, but it's really common. I'm just used to it and have more experience finding my mistakes because I've made them so much.

> and the micro:bit seems a good solution to that.

I think so. I think there's a huge step forwards when you can get something working quickly, then build from there.

Re:Exploring the BBC Micro:bit Software Stack and OS by djaychela on Wednesday November 29, 2017 @10:01AM (#15807248)
Thanks for all that - one of the most honest and helpful comments I've seen on here, and particularly useful for me! Usually people don't let on about them, so I feel much better.

I'm buying my youngest step-child a Micro:bit for Christmas. Well, I say it's for him...

Re:Exploring the BBC Micro:bit Software Stack and OS by matthewwarren on Wednesday November 29, 2017 @12:43PM (#15808990)
> I'm buying my youngest step-child a Micro:bit for Christmas. Well, I say it's for him...

I think that I'll be doing something similar ;-)

Re:Exploring the BBC Micro:bit Software Stack and OS by IanCal on Thursday November 30, 2017 @08:58AM (#15815704)
I think I should clarify a bit here, these "boring" things are important for real production work. I'm not arguing that they should be all removed, but if I just want to play with something then it's overkill.

It feels like having to get regulatory approval, surveys and having OSHA oversight while making sandcastles.

Re:Exploring the BBC Micro:bit Software Stack and OS by fstephany on Wednesday November 29, 2017 @09:34AM (#15807037)
Beware not to deblaterate nonsense (in this case Eclipse and OAuth Client ID) when you want to make a point. This will make you vulnerable to counter argument on details and not on what you want to convey.
Re:Exploring the BBC Micro:bit Software Stack and OS by IanCal on Wednesday November 29, 2017 @10:21AM (#15807417)
What nonsense? I found the google page on beacons and it says to go and deal with oauth.

https://developers.google.com/beacons/proximity/get-started

Android dev used to say to go to eclipse, now it's JetBrains apparently. Have a look at the "your first app" here:

https://developer.android.com/training/basics/firstapp/index...

Compare just part of the code for making text appear:

    public class MainActivity extends AppCompatActivity {
    public static final String EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    /** Called when the user taps the Send button */
    public void sendMessage(View view) {
        Intent intent = new Intent(this, DisplayMessageActivity.class);
        EditText editText = (EditText) findViewById(R.id.editText);
        String message = editText.getText().toString();
        intent.putExtra(EXTRA_MESSAGE, message);
        startActivity(intent);
    }
    }
Which comes along with XML like this

     All you need to do is declare which activity is the logical parent in the AndroidManifest.xml file. So open the file at app > 
    manifests > AndroidManifest.xml, locate the <activity> tag for DisplayMessageActivity and replace it with the following:

    <activity android:name=".DisplayMessageActivity"
          android:parentActivityName=".MainActivity" >
    <!-- The meta-data tag is required if you support API level 15 and lower -->
    <meta-data
        android:name="android.support.PARENT_ACTIVITY"
        android:value=".MainActivity" />
    </activity>
This is before trying to get radios working, beacons, etc. Just text, a button and "back".

For something exciting and interesting, I'd rather not see "paste the following XML" anywhere in the instructions.