Sunday, February 9, 2020
A nice online guid generator
I like this online guid generator: https://www.guidgenerator.com/online-guid-generator.aspx
Saturday, January 25, 2020
SDTM in a nutshell
Beautifully explained the practical methods for creating CDISC SDTM tables:
https://support.sas.com/resources/papers/proceedings/pdfs/sgf2008/207-2008.pdf
Golden words: Analyses are "one proc away" from ADaM data.
Other important SAS related references:
SAS clinical questions and answers: https://tekslate.com/sas-clini cal-interview-questions-and- answers
There is a listing of sample graphs and example code: https://support.sas.com/en/kno wledge-base/graph-samples-gall ery.html
Details of Oncology studies and a relation between SDTM, ADaM and Controlled Terminology: https://www.pharmasug.org/proc eedings/2018/DS/PharmaSUG-2018 -DS06.pdf
Powerpoint slides details on ADaM tables and RECIST 1.1: https://www.cytel.com/hubfs/0- library-0/pdfs/CDISCJourneyonS olidTumorusingRECIST1.1.pdf
Again, it is a listing of sample graphs: http://support.sas.com/sassamp les/graphgallery/PROC_SGPLOT. html
https://www.cdisc.org/system/f iles/all/event/restricted/2018 _US/6B-CDISC-ADaM_Overview_-_ Minjoe.pdf
https://www.cdisc.org/system/f iles/all/event/restricted/2017 _International/INTX17%20Sessio n%203%20Track%20A_Soloff.pdf
https://www.lexjansen.com/phar masug/2018/DS/PharmaSUG-2018- DS24.pdf
https://www.lexjansen.com/phar masug/2010/HW/HW06.pdf
https://www.quantics.co.uk/ blog/an-introduction-to- integrated-summary-of-safety- and-integrated-summary-of- effectiveness-iss-and-ise/
https://blogs.sas.com/content/ iml/2011/09/19/count-the- number-of-missing-values-for- each-variable.html
https://blogs.sas.com/content/ iml/2012/04/02/count-missing- values-in-observations.html
https://journals.lww.com/anest hesia-analgesia/Fulltext/2018/ 09000/Survival_Analysis_and_ Interpretation_of.32.aspx
https://www.lexjansen.com/phar masug-cn/2014/CD/PharmaSUG- China-2014-CD03.pdf
https://www.lexjansen.com/phus e/2018/ds/DS03_ppt.pdf
Graphs from Robert Allison: https://robslink.com/SAS/Home.htm
About ADaM flags: https://www.pharmasug.org/proceedings/2013/PO/PharmaSUG-2013-PO11.pdf
http://www.stattutorials.com/SAS/
Oncology Survival Plot: https://support.sas.com/rnd/datavisualization/papers/Annotate_Your_SGPLOT_Graphs.pdfhttps://support.sas.com/rnd/datavisualization/papers/Annotate_Your_SGPLOT_Graphs.pdf
Survival analysis (Time-to-event analysis) is the process of measuring the length of time to the event. The event could be progress-free survival or overall survival or objective response rate. It may not be possible to measure the length of time for some patients because the patient disappeared or a bus hit him, or the study called off, etc. The missing data related to that patient is called the censored data.
Proc lifetest is useful to get the survival plot in a clinical trial. Also it provides multiple survival plots between two treatments. In the TIME statement, the survival time variable, Days, is crossed with the censoring variable, Status, with the value 0 indicating censoring.
https://support.sas.com/resources/papers/proceedings/pdfs/sgf2008/207-2008.pdf
Golden words: Analyses are "one proc away" from ADaM data.
Other important SAS related references:
SAS clinical questions and answers: https://tekslate.com/sas-clini
There is a listing of sample graphs and example code: https://support.sas.com/en/kno
Details of Oncology studies and a relation between SDTM, ADaM and Controlled Terminology: https://www.pharmasug.org/proc
Powerpoint slides details on ADaM tables and RECIST 1.1: https://www.cytel.com/hubfs/0-
Again, it is a listing of sample graphs: http://support.sas.com/sassamp
https://www.cdisc.org/system/f
https://www.cdisc.org/system/f
https://www.lexjansen.com/phar
https://www.lexjansen.com/phar
https://www.quantics.co.uk/
https://blogs.sas.com/content/
https://blogs.sas.com/content/
https://journals.lww.com/anest
https://www.lexjansen.com/phar
https://www.lexjansen.com/phus
Graphs from Robert Allison: https://robslink.com/SAS/Home.htm
About ADaM flags: https://www.pharmasug.org/proceedings/2013/PO/PharmaSUG-2013-PO11.pdf
http://www.stattutorials.com/SAS/
Oncology Survival Plot: https://support.sas.com/rnd/datavisualization/papers/Annotate_Your_SGPLOT_Graphs.pdfhttps://support.sas.com/rnd/datavisualization/papers/Annotate_Your_SGPLOT_Graphs.pdf
Survival analysis (Time-to-event analysis) is the process of measuring the length of time to the event. The event could be progress-free survival or overall survival or objective response rate. It may not be possible to measure the length of time for some patients because the patient disappeared or a bus hit him, or the study called off, etc. The missing data related to that patient is called the censored data.
Proc lifetest is useful to get the survival plot in a clinical trial. Also it provides multiple survival plots between two treatments. In the TIME statement, the survival time variable, Days, is crossed with the censoring variable, Status, with the value 0 indicating censoring.
The ADSL data structure has one record for one subject and contains subject-level population flags indicating whether subjects are in efficacy, safety, pharmacokinetic, pharmacodynamic, food effect, or dose proportionality analyses. In the Basic Data Structure (BDS) data sets, common record-level analysis flags include: recheck flags, flags for exclusion, baseline flags, early termination identifiers, and treatment-emergent flags.
Thursday, January 16, 2020
Free, free, free ReactJS templates
Isn't it beautiful if you can find some free templates that makes your job simpler to build a ReactJs app?
Here you go: https://colorlib.com/wp/free-react-templates/
Another life saver with the templates: https://bootstrapious.com/p/bootstrap-sidebar (all you got to do is go to demo pages, view source, and customize it to your requirement) %3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22WS%22%20style%3D%22rounded%3D0%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22849%22%20y%3D%22295%22%20width%3D%2235%22%20height%3D%2230%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Here you go: https://colorlib.com/wp/free-react-templates/
Another life saver with the templates: https://bootstrapious.com/p/bootstrap-sidebar (all you got to do is go to demo pages, view source, and customize it to your requirement) %3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22WS%22%20style%3D%22rounded%3D0%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22849%22%20y%3D%22295%22%20width%3D%2235%22%20height%3D%2230%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
Saturday, January 11, 2020
What to prepare when applying for a JavaScript position?
What to prepare:
- Core JavaScript concepts: 10 things to learn during a weekend
- Building NPM packages, publishing, and importing
- Building an application with an express server
- Two ways of creating a react app: from scratch and from create-react-app
- Build react app with a fake server for API testing
- Git repos and commands
- Responsive web design, (can this make the process simpler: react-responsive-navbar)
- CSS approaches: SCSS files, bootstrap, css modules, media-queries
- ReactJs routing, hooks, using context & HIC, child as a function
- Some examples of Jest unit testing
- Some examples of Ajax call testing
- Feature testing: Selenium, Cypress
- Responsive web design
- A11y
- ESLinting
- Build and deploy process
- CodeSandBox and CodePen
- Workshop
Core JavaScript concepts:
Function objects:
- Functions are function objects. In JavaScript, anything that is not a primitive type ( undefined, null, boolean, number, or string) is an object. Objects in JavaScript are extremely versatile. Because of this, we can even pass a function as a parameter into another function.
Callback functions:
- A callback is a function that is to be executed after another function has finished executing — hence the name 'call back'.
- Example: setTimeout(function() {console.log('I am the response from callback function')}, 300)
Promises:
Use Promise API to use asynchronous code. Create promise object using Promise API, access the asynchronous code response using promise.then.
Use Promise API to use asynchronous code. Create promise object using Promise API, access the asynchronous code response using promise.then.
Example:
let promise = new Promise(a callback function);
// By the way, this callback takes two parameters resolve and reject that are functions too, so…
let resolve = function(){}
let reject = function(){}
let promise = new Promise(function(resolve, reject) {
// do your async code here…
// If successful, call resolve function
// If failure, call reject function
});
promise.then to handle the data returned by either resolve or reject
Nobody can explain promises better than this guy: https://www.sitepoint.com/overview-javascript-promises/
Closures:
A Closure is nothing but a function that has access to the variables defined in outer (and enclosing) function.
As far as scope is concerned, the closure has access to global variables, its own variables, and variables of outer (and enclosing) function.
Example:
const myFunctionTwo = () => {
const message = 'My New Message';
const printMessage = () => {
console.log(message);
}
return printMessage;
}
const myPrintMessage = myFunctionTwo();
myPrintMessage();
// prints My New Message
Currying:
The curried effect is achieved by binding some of the arguments to the first function invoke, so that those values are fixed for the next invocation. It’s something like keeping masala ready and cook either chicken, goat, beef with ease.
Example:
var all_you_have_to_do_is_specify_masala = function(masala) {
return cook_with_masala = function(b){
console.log('i cooked ' + b + ' with ' + masala)
}
}
let use_ramesh_recipe = all_you_have_to_do_is_specify_masala ('masala made with garlic, ginger, spices')
use_ramesh_recipe('chicken')
use_ramesh_recipe('goat')
JavaScript making HTTP requests
The XMLHttpRequest object can be used to request data from a web server.
Example:
const puzzleAPIhit = () => {
const request = new XMLHttpRequest()
request.addEventListener('readystatechange', (e) => {
if (e.target.readyState === 4 && e.target.status === 200) {
const data = JSON.parse(e.target.responseText);
console.log(data.puzzle)
} else if (e.target.readyState === 4) {
console.log('An error has taken place')
}
})
request.open('GET', 'https://puzzle.mead.io/puzzle?wordCount=3')
request.send()
}
puzzleAPIhit();
Fetch API:
The Fetch API introduced in relatively newer versions of JavaScript and has built-in support for Promises. Technically, it is just another method of hitting HTTP Requests while harnessing the powers and perks of Promises and Promise Chaining.
fetch('http://puzzle.mead.io/puzzle', {}).then((response) => {
if (response.ok) {
return response.json();
/*
Actually, the .json() method takes the response and returns a Promise Object and hence
We need to add another then() as we have done in Promise Chaining
*/
} else {
throw new Error('Unable to fetch the puzzle');
}
}).then((data) => {
console.log(data.puzzle);
}).catch((error) => {
console.log(error);
});
Object Oriented Programming (OOP) in JavaScript:
OOP describes a way to write programs. This way focuses on data: stored as object properties, and actions: stored as object methods.
- Constructor functions versus ES6 classes, encapsulation, inheritance, prototypal vs static methods in JavaScript: https://medium.com/@luke_smaki/javascript-es6-classes-8a34b0a6720a
- Prototypal methods Vs Static methods: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes
- Building NPM packages, publishing and importing (https://npmjs.com)
Building an application with an express server:
- Create the app from express, tell your app how to handle get, post, put requests, and run the app at a port
- Reference: https://alligator.io/nodejs/express-basics/
Creating a React app from scratch:
- You need Webpack, React, Babel to create a react app from scratch.
- Example: https://www.valentinog.com/blog/babel/
- Create a React using create-react-app:
- Example: https://github.com/facebook/create-react-app
Build react app with a fake server for API testing
Spring Boot + React application
Could this process be easier than this?
https://dzone.com/articles/spring-boot-and-react-happily-ever-after
https://dzone.com/articles/spring-boot-and-react-happily-ever-after
Wednesday, October 16, 2019
Test Driven Development (TDD)
AAA - Arrange, Act, Assert

DIE - describe - it - expect

Fail - Pass - Refactor

Bare-bones ReactJS application with Jest and Enzyme
https://github.com/kadirisani/reactjs-jest-tutorialGood References:
https://codewithhugo.com/jest-fn-spyon-stub-mock/It took me a while to find this online tool where TDD can be practiced. Enjoy TDD: https://repl.it/languages/jest -- it stopped working :(
Monday, October 14, 2019
Webpack made easy :)
Came across this blog and delighted to read the details on how to set up a ReactJs application from scratch. Really awesome, read on: https://www.valentinog.com/blog/babel/
While following the example, use the following in webpack.config.js instead of what was suggested in the blog to resolve the .jsx files:
And use the following in index.js file (remove the last two lines from Form.js):
Also, remove .babelrc and create babel.config.js under project and add the following content:
module.exports = { presets: ['@babel/preset-env', '@babel/preset-react'], };
To add Jest to run the unit tests, do the following steps:
To add SASS/SCSS to this project, check this out: https://medium.com/front-end-weekly/how-to-add-sass-or-scss-to-create-react-app-c303dae4b5bc
While following the example, use the following in webpack.config.js instead of what was suggested in the blog to resolve the .jsx files:
const HtmlWebPackPlugin = require("html-webpack-plugin")
module.exports = {
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
resolve: {
extensions: [".js", ".jsx"]
},
use: {
loader: "babel-loader"
}
},
{
test: /\.html$/,
use: [
{
loader: "html-loader"
}
]
}
]
},
plugins: [
new HtmlWebPackPlugin({
template: "./src/index.html",
filename: "./index.html"
})
]
}
And use the following in index.js file (remove the last two lines from Form.js):
import React from 'react'
import ReactDOM from "react-dom"
import Form from "./js/components/Form"
const wrapper = document.getElementById("container")
wrapper ? ReactDOM.render(<Form />, wrapper) : false
Do npm run build and use the main.js file in https://reactjs.org/docs/add-react-to-a-website.html#add-react-in-one-minute (use a div with id 'container' in index.html)
wrapper ? ReactDOM.render(<Form />, wrapper) : false
Do npm run build and use the main.js file in https://reactjs.org/docs/add-react-to-a-website.html#add-react-in-one-minute (use a div with id 'container' in index.html)
Also, remove .babelrc and create babel.config.js under project and add the following content:
module.exports = { presets: ['@babel/preset-env', '@babel/preset-react'], };
To add Jest to run the unit tests, do the following steps:
npm i jest babel-jest react-test-renderer --save-dev
npm i enzyme --save-dev
In package.json
"scripts" : {
"test": "jest"
}
To add SASS/SCSS to this project, check this out: https://medium.com/front-end-weekly/how-to-add-sass-or-scss-to-create-react-app-c303dae4b5bc
Subscribe to:
Posts (Atom)