Tuesday, February 27, 2018

Icelandic Summer Landmannalaugar Solo Trekking and Camping Guide

   I want to make this post brief.  Mostly there's a lot of travel guides out that mention considerations to Icelandic weather, heed the advice, but I'll add something additional here.  Iceland is a Northerly country subject to more extreme weather conditions even in the summer.  It can be sunny and generally nice, even while it is cooler, and then it can be more extreme in terms of gales and stormy weather.

This past summer I managed to do the Landmannalaugar trek, but also encountered more severe gales.  The weather events were enough to have a warden shutting down the trails, and strongly suggesting camper's (with tents) to take up adequate shelter.  One particular camp was closed so that my starting day thru hike from the first destination point was instead differed to a third camp site.  That is going from the interior highlands south to the lowlands.  I decided (owing to getting ahead of an incoming storm) not to stay at a higher altitude alpine location and instead thru hike to the second location which was lower elevation, but even so were deferred to a third location.  That being said, extreme weather events can lead to camp closures if warden's make decisions that adequate shelter isn't afforded.  Also expect thru severe weather events that wardens may close the trails down (in our case a full day).  Quite likely though you wouldn't want to be out there anyways.  Just keep this in mind when factoring time schedules.

Fortunately the trek does provide a number of bus opportunities, but I would suggest taking note of schedule if you intend to use this.  Don't assume that huts (because they are advertised) are likely to be open.  First come, first serve?  Sort of, but not really.  During the height of tourist season, as I experienced, and especially during a severe weather event, the huts tend to be in high demand, but especially by paid tour groups, so unless you have exclusive reservation through a tour company, don't count on a hut being available, and make that even less likely if severe weather comes.  Going with paid touring companies affords more likely access to huts, and/or luxury treatments for trekking.
Wise to bring a three or four season tent.  I rode out severe storm with extremely high wind gales in a three season hiker's light weight tent which served well especially when sheltered in with a stone wall for weather reinforcement.

If it storms and severely so, you will likely deal with plenty of water (especially given all the river and stream crossings).  The deepest stream was nearer to the Thorsmark terminus which (at that time of the year...July) was waist high and generally a stronger current...I am six feet in height.  Highly recommend trekking poles for the crossing and/or managing to scout an adequate channel crossing site.  Keep pack belt un clipped so that your pack can be evacuated from your back in rapid fashion should you fall into the stream.  The water is glacial cold.  Wet shoes with decent traction and/or water sandals (same) can come in handy.  Gaiters are likely fine for most of the highlands, not so good where the streams in south are deeper...most stream crossing can do better with water wear for your feet.  Just change before and after crossing from dry to wet footwear and so forth.

I had witnessed a number on my trek through hiking to Thorsmark in a two or three day journey or busing out earlier because of weather conditions.  Most it appeared especially came into Thorsmark early (from our starting group) likely because of wet gear or the inability to keep gear sufficiently dry.  I, fortunately managed to keep gear dry through the duration of the severest weather, but found that on the tail end of the worst storm, my gear was saturated.   Thus I would suggest some added things for a tent.  One, it has a rain fly vestibule area where hiking boots and/or additional gear not stored in the tent can be kept in dry safe keeping, or that alternately you have a rain tarp situated so as to provide your tent additional dry space.  Secondly, compartmentalizing tent and sleeping bags or anything in tote from one another to ensure that water doesn't creep saturate internally other parts of your gear another thing to keep in mind.  Stowing an external rain tarp outside your pack can simplify this, or keeping the rain fly of your tent plastic bag stowed and segregated from other dry gear should help a lot.  Don't assume a rain cover for your pack is enough.

High humidity can more likely bring ruin to your down bag experience...consider synthetic bags.  Consider woolens and synthetic wear.  Bring and expect to use layers. 

Another small secret I'll share with you...I asked a warden, if my family home would see present weather conditions where I was at...she replied, 'That information most certainly will not be published outside Iceland!'  While I used free Wi Fi hotspots throughout Iceland.  I found none on the trek.  Something to be aware of if you intend to use wifi as a means of communication.  As to cellular service and using your existing phone abroad, check in advance.

Guides will tell you to expect much...don't assume that the weather reports that you see are what to expect before you go...its always sunny and nice, till you get there... who wants to lose revenue anyways?  :)


Saturday, February 3, 2018

React and Redux

What is the difference?

One I hadn't wanted to attempt as thorough researcher to answer this question with technical ins and outs, but rather approach this with a simplest possible answer, at least a reduced answer that avoids all the technical ins and outs of differences here.

One while react does provide in its framework controller model and controller logic interfacing, by far, React provides a framework with the design aspect of encapsulating mvc structure in a component by component basis and View predominant in its focus.  While React can be designed functional in nature, it seems to me to lend itself to classical OOP design patterns.  It is, of course, also quite easy to learn and trending popular in terms of adoption and use.

Redux apps on the other hand may share some structural difference to MVC design patterns in the way of separating Controller and Model logic with the that of the view systems, as opposed to having a compact all in one strictly component integration.  That is, in housing model and controller logic to the component.  Redux logic separate Controller logic into, for instance, actions and states of the app, and making ease in generalizing the state and actions of the application across components and containers, which are components that merely handle the delegation of component actions and states.  It is also one of a functional design pattern that provides injection patterns into component and containers alike, so it also extends functional design in a positive way given flexibility and power in evolving state and action of the app.  The downside (if such is appropriate) is that Redux has a higher learning curve for adoption, at least in the pure sense of learning redux without middleware helpers.

Which to use?

If you were wanting to gain experience with Redux design and especially functional programming work, it seems Redux would be a good choice.

If you have complex state and action managements for you Web Apps design patterns, Redux may also be  another good choice, though as I've read for asynchronous management, you may need some added middle ware helper (Redux provides advice on this).

If you are new to creating Web Apps or want something that easy to dive into, React is great as a learning tool and creating a web app quickly.   React provides great versatility and state management is especially easy to understand and implement.  However, complex state management systems with two way bindings and especially implementing a generalized state management system could be also just as cumbersome work in React relative to Redux.  Thus I've seen, for instance, WebRTC web apps designed in Redux relative to being purely React, and there's likely no coincidence where app states and actions would need be shared across a number of components since an overarching controller system provides some clarity to the approach of binding data.  Redux, add goes beyond what Angular provides here especially where Angular component models increasingly resemble the simplicity of React's components which has been the trend apparently for any number of web app frameworks.
 While two way bindings, for instance, attend to the problem of two way state mutations, in React or Angular for that matter, on the other, hand I've found myself violating the mutability principle of functional programming design.  That is, instead of mutating the inputs, providing a return object that expresses a new state.  Redux, in this way, could be considered the preferable approach if and wherever app design patterns make use of two way bindings between child and parent components and is required.

If you know neither, perhaps, it may help to understand React first and then learn Redux.  Though when learning Redux provides for enough distinction to think of Redux app by way of Redux design through its native api documentation (React may not be helpful) alone.  Trying to understand Redux, through React documentation, in other words, can get in the way, in my opinion.

React is to Redux, however, arguably for what Python is to C++...which is something to keep in mind. 

Tuesday, January 30, 2018

Admin email notifications with firebase database write queries (JavaScript)

Prerequisites:
  •  NodeJS with NPM installed.  
  •  Google Firebase Account
    With your favorite web app framework you can configure your web app to auto generate emails based on site user feedback.

I've used ReactJS in this case for a generic contact us model form submission.  A quick tutorial on getting started with React JS and setting up this model can be found at:

https://www.codementor.io/yurio/all-you-need-is-react-firebase-4v7g9p4kf



   In this project I adapted recipes given for firebase user authenticated additions... from sites:

https://www.menubar.io/firebase-functions-sending-emails/

and

https://github.com/firebase/functions-samples/tree/master/quickstarts/email-users

Follow the quickstart tutorial in the functions-samples link.  Namely, in setting up your gmail account to send emails via node mailer.
Once say you have your react project or whatever project using firebase set up.  You'd need to go to that particular folder and initialize firebase functions...to do this actually will require potentially a couple of proceeding console commands at the root of your project directory:

npm install firebase-functions@latest firebase-admin@latest --save
npm install -g firebase-tools
then

firebase init functions

Go into the functions directory (via command prompt or console/terminal) and type:

npm install nodemailer --save

node package manager will initialize the project with the functions folder and install (provided your acceptance) the necessary node packages.  Note:  highly recommend that you double check your git ignore file and configure the ignore for the functions folder if you are using git.

An adapted code (from the above links), for instance, in sending email notifications looks like this:

const functions = require('firebase-functions');

const nodemailer = require('nodemailer');
// Configure the email transport using the default SMTP transport and a GMail account.
// For Gmail, enable these:
// 1. https://www.google.com/settings/security/lesssecureapps
// 2. https://accounts.google.com/DisplayUnlockCaptcha
// For other types of transports such as Sendgrid see https://nodemailer.com/transports/
// TODO: Configure the `gmail.email` and `gmail.password` Google Cloud environment variables.
const gmailEmail = `****@gmail.com`;
const gmailPassword = `*****`;
const mailTransport = nodemailer.createTransport({
  service: 'gmail',
  auth: {
    user: gmailEmail,
    pass: gmailPassword
  }
});

// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
//  response.send("Hello from Firebase!");
// });
const APP_NAME = 'Cloud Storage for Firebase quickstart';
exports.sendFEmail = functions.database.ref('messages/{uid}').onWrite(event => {

    // only trigger for new users [event.data.previous.exists()]
    // do not trigger on delete [!event.data.exists()]
    if (!event.data.exists() || event.data.previous.exists()) {
      return
    }
  
    var user = event.data.val()
    console.log(user);
    var {email} = user

      const mailOptions = {
        from: `${APP_NAME} `,
        to: `****@gmail.com`
      };
    
      // The user subscribed to the newsletter.
      mailOptions.subject = `**** Contact Notice!`;
      mailOptions.text = `${user.name} sent a message!. Here is the message:  ${user.message}.  This is the sender's email address:  ${user.email}`;
      return mailTransport.sendMail(mailOptions).then(() => {
        console.log('message sent!');
      });
    })

You'll put this code say in an index.js file in the functions directory...just replace the existing default code set.

Now you can easily deploy this up to firebase...
In your project's root directory in console just type:

firebase deploy --only functions

This pushes the function up as firebase function...what does this code do?

Reading the line  "functions.database.ref('messages/{uid}').onWrite(event..."

This is an event handler set on the database called when ever a write event occurs on the database 'messages' database key.  When a post request is created on the firebase database writing a new database entry, the event handler function is called.

The event handler in this case, if you are doing further reading, refers the database entry set as 'user'.
The object 'mailOptions' is passed in turn to the mailTransport inside the method sendMail...noting for nodemailer this is parameter nature of sending mail.

Suggested reading for further firebase api documentation as related to real time database event handling:
https://firebase.google.com/docs/functions/database-events


Sunday, January 21, 2018

Future Speculations for future devs

    Toss out the notion of "experience" or being "experienced"...this will be a malinger to outmoded industry practice.  It isn't what we know anymore that matters.  Your mastery is less regarded by specialty to anyone thing, but given to new things.  New Frameworks will emerge as old one's die, though an ecology settles into more common practices.  There is too much to learn with little time for a given dev industry to claim expert.  Pay attention to your communication or lack thereof...the future is about hand holding given so much flux!  No one is interested in stable industry practice...they are interested in disruptive practices!  AI handles the rest!  The future is dizzying with new technologies and scary at that!  You will have switched to one framework after another in a given days pace! And having exposed your self to a new language all the same on a daily basis!

Saturday, January 20, 2018

The Self Paradigm

   The essence of being is always accounted for in ways given constraints.   Mythology of the self.  Apparently given rise of a new dangerous youth...that we are likely fragmented in a way by technology that imperils our connectivity to others around us, yet seems conspicuously born of a similar fantasy that has alongside plagued civilization since its inception.  Neither is it so easy to say that our minds haven't changed.  The self paradigm is given by the paradox of something that has long been unsettled, always mutable and shifting as easily.  What is healthy of our behavioral patterns in such question, one might ask?  That we persist in asking the same questions of ourselves while insular indoctrination abounds beyond the conspiracy of tethering mobile devices? 
More than the smartphone alone is responsible in rewiring the self as we have perceived it...what do we admit of the mythology of the self paradigm?

We start at the premise of my invented country and we start at the premise of my invented self.   

Sunday, December 31, 2017

DIY Audio self publication starting out


   I recommend having a modest exploratory budget in mind if you intend to seek out a niche in the self publishing world of music and are a newcomer. 

   Gear requirements for a modest (non smartphone setup): 
   -Microphone(s)
   -DAW (Digital Audio Workstation) software (e.g. Ableton Live 9 or Protools) or some DAW platform  (e.g.  Tascam and a number of manufacturers can be found providing gear through places like sweetwater.com).
   -USB interface (if using DAW software option).
   -Laptop or Desktop or possibly Tablet (check your DAW software hardware requirements to make sure both USB interface and hardware meet software specifications).
 
That's technically about it to get started.

A little primer on mics:

Shure microphones have been a nice versatile gig and studio recording microphone.  While home studio recording budgets are more easily fashioned using any number of condenser mics now on the market.  A basic setup will require likely a laptop/desktop/tablet if you want decent audio recording though the reality of smartphone recordings are equally here to stay.  Native smartphone recordings are likely going to be very rudimentary for room recordings relative to home studio setups.  Unless you know what you are looking for in a microphone...I highly recommend entry level stuff if you are new to the business.

DAW software...I recommend going with larger scale suite options that provide unlimited track options and studio effects packages.  At least this allows you to in house much of your track mastering and studio effects needs for audio production purposes.

USB interface...what are your purposes and needs...if you are a solo musician that need only record yourself and maybe a single instrument at a time, the simplest interfaces likely work (e.g. 2 mic inputs and 2 1/4" stereo inputs) probably will work fine.  If you need to do live session recording work with more than 1 musician, you may want to investigate larger scale interfaces that furnish more simultaneous inputs. 

Laptop and Desktop.  I've used mid line processors for laptops or desktops alike.  Your audio interface will do the Analog to Digital work so really whatever remains necessary for computation in audio is generally pretty well handled for many home studio applications...your audio interface hardware setting will need be set to ASIO for input (which directly has the audio interface) handling (much like a video card has a gpu) audio based computational work. 

Learning to record:
I'll omit particular guides on recording and mastering (beyond scope of what I wanted to cover right now).    If you make time and effort to record, you'll likely be recording something and learning to use your gear.  Otherwise, not.  Anytime spent recording is better than no time or time that need be structured in highly choreographed ways.  The more people that have to be recorded will likely mean tighter and more restrictive scheduling unless you work around this...in other words, do you have to have everybody in a music group there to record at any given time in order to record and the same goes for mastering?  Spend your time doing scratch work to learn.  Plenty of scratch is how you learn to get better at what you are doing.  The best time learning about audio engineering may come in your own company doing this work whenever you can...doing this on your time not others.

Publishing to Video sites.  Many musicians actually use either slideshows or a single photo still for, for example, Youtube publication.  Here are some things to keep in mind:

Windows, Mac, and iOS furnish native movie making programs that allow you to import your audio file.  The simplest self publication  here uses a photo still of your choosing and creating a video length of that still filling out the time span of the audio file being interlaced with that image still.  You can get, of course, more creative and build slideshows or integrating video of your choosing.

More premium video production services:

You can invest in things like Adobe premiere or Adobe Cloud subscription.  Here you can build more complex choreography of video work here.  There is likely a bit more of a learning curve both understanding how to work with animated transitions that weren't template ones.  Though Adobe does provide templates as well if you hadn't wanted to learn the ins and outs of editing timeline curves for animating effects and transitions.  You may want to learn things like audio video synchronization when using separate audio and video recording (non interlaced sources).   

At the moment.  H264 is a common high definition standard for video publication.  Likely your video editor will give you mastering format options for the video type that you want to produce for a given social media platform (at least it should). 

Self publications to sites like Google Play, Amazon, Apple Store and Spotify:

Sites like DistroKid  allow you to publish your music by handling all legal work necessary to get your music copyright recognized...you pay a yearly subscription fee (entry level is a small annual fee) and you keep royalties on your music sales.

Self marketing: 

Uploading your music to Youtube, or getting yourself setup for any given market online or otherwise, isn't a likely guarantee to music sales, and unfortunately, even marketing online may not be either.  Far from quality audio recordings can actually be quite successful and mostly this relates to how any recording artist(s) sell themselves in a social way.  If you are niched in a collector's market, you may have decent odds depending on the media type that you are selling (e.g., vinyl and CD may provide better returns than by mp3).  Though as I've read, you likely want to avoid being excessive with twitter, facebook or any other social media spam when engaging with people socially.  Positives would include getting reviewed and featured in zines, music journals and so forth, and potentially having higher levels of exposure through sites with larger scale traffic.  Word of mouth and festivals are likely a bigger positive to social exposure.  Having someone's ear is different than having hoped they stumbled upon you in a vast sea of audio. 

 Home studios have been liberated with higher quality audio production tools that are more affordable, but the pool of interest in doing such has also increased.  If the acceptance of a culture around poorer quality audio production recordings is a testament that successful social exposure need not correlate to higher quality gear, if you are entry level into this market, I wouldn't bother trying to raise significant money to pay either for a recording or for the gear to do such.  It is a waste unless you know what you are doing. 


Oblivion

 Between the fascination of an upcoming pandemic ridden college football season, Taylor Swift, and Kim Kardashian, wildfires, crazier weathe...