Skip to content

Instantly share code, notes, and snippets.

View CodingItWrong's full-sized avatar

Josh Justice CodingItWrong

View GitHub Profile
import NewMessageForm from './NewMessageForm';
+import MessageList from './MessageList';
...
render() {
+ const { messages } = this.state;
return (
<View>
<NewMessageForm onSend={this.handleSend} />
+ <MessageList data={messages} />
import React from 'react';
import {
FlatList,
Text,
} from 'react-native';
const MessageList = ({ data }) => (
<FlatList
data={data}
keyExtractor={item => item}
"android": "expo start --android",
"ios": "expo start --ios",
+ "test": "node_modules/.bin/jest test/**/*.spec.js",
"eject": "expo eject"
},
...
"jest-expo": "^31.0.0"
},
+ "jest": {
+ "preset": "jest-expo"
+const { reloadApp } = require('detox-expo-helpers');
+
describe('Example', () => {
beforeEach(async () => {
- await device.reloadReactNative();
+ await reloadApp();
});
{
...
"detox": {
- "test-runner": "jest"
+ "test-runner": "jest",
+ "configurations": {
+ "ios.sim": {
+ "binaryPath": "bin/Exponent.app",
+ "type": "ios.simulator",
+ "name": "iPhone 8"
import React, { Component } from 'react';
import {
View,
} from 'react-native';
export default class App extends Component {
render() {
return (
<View>
</View>
import React, { Component } from 'react';
import {
TextInput,
View,
} from 'react-native';
export default class NewMessageForm extends Component {
render() {
return (
<View>
@CodingItWrong
CodingItWrong / programming-burgers.md
Last active January 14, 2019 14:13
Programming Burgers

Inspired by this exchange:

@rickhanlonii: My phone autocorrects in-n-out to --no-config it's probably okay

@CodingItWrong: There are a lot of configuration-heavy burger places these days

  • React: You just get the hamburger patty because we want it to be edible by the widest possible variety of people. How can we know in advance how you want to eat it?
  • Preact: less than three calories and just as tasty as React to most people's tastebuds.
  • Vue: we include the pieces that most burgers will need: the patty, the cheese, and the bun. Everyone can add the condiments they already like.
  • Ember: the burger will be more delicious if all of us focus on improving one recipe.
@CodingItWrong
CodingItWrong / vue-apollo-update.js
Last active February 20, 2019 12:08
Vue-Apollo Update
// see https://vue-apollo.netlify.com/guide/apollo/mutations.html
{
addTag() {
// We save the user input in case of an error
const newTag = this.newTag
// We clear it early to give the UI a snappy feel
this.newTag = ''
// Call to the graphql mutation
this.$apollo.mutate({
// Query
@CodingItWrong
CodingItWrong / questions.md
Created August 30, 2019 12:01
Copy Paste Repeat questions

Hey y’all, I have a couple of questions in response to Episode 31, “You can only code so fast.” Maybe they’d make interesting followup discussion.

The question addressed is “what comes after senior?” You mentioned at the end of the episode that you don’t necessarily need to be looking to move beyond senior, but the gist of the convo implied that most devs most of the time would. I want to dig into that a bit more:

  • You mentioned the idea "I can't get paid any more to keep doing what I'm doing right now." I’m privileged to be paid pretty well. Am I a crazy outlier that I don't think I need more money than I'm making right now?
  • Do you think that most developers will always want to continue to be challenged in new ways? Do most developers never reach a point where they say "what I'm doing here is great, I want to continue doing what I'm doing in different arenas and for different people?"

As far as when people do want a new challenge, the two categories you mostly discussed were deeper IC computer-