Skip to content

Instantly share code, notes, and snippets.

const ToHoc = (Component) => {
return (Wrapped) => {
class GeneratedHOC extends React.Component {
render() {
return (
<Component render={args => <Wrapped {...this.props} {...args} /> } />
);
}
}
}

“Honesty in small things is not a small thing.”

This is a book about humble concerns whose value is nonetheless far from small.

We can accept for granted that responsible professionals give some time to thinking and planning at the outset of a project.

I think this is one of the base assumptions the book makes about its readers. If your routine is to hop directly into code without a thought for the overall design, you may try to change that habit.

Total Productive Maintenance

Keybase proof

I hereby claim:

  • I am vcarl on github.
  • I am vcarl (https://keybase.io/vcarl) on keybase.
  • I have a public key ASDlWlpXqRlQBdfwuc6TB0DKpDQdXtlKgT97d7lQCv_v8wo

To claim this, I am signing this object:

Adding manpower to a late software project makes it later.

Development managers often win their management roles primarily from having been stellar coders while displaying a modicum of people skills.

Programming teams can tell management that the product is one week from being functionally complete every week for the months.

A program can produce the desired results and be so poorly designed and/or executed that it cannot realistically be enhanced or maintained.

For too many managers (especially less technical managers, such as CEOs or CFOs) prototypes appear to be “done.”

@vcarl
vcarl / README.md
Last active October 3, 2020 03:46
Gatsby i18n page generation

This also assumes constants of

exports.defaultLocale = "en";
exports.supportedLanguages = ["en"];

translatedLocales coming from createI18nPages.js is important, and needs behavior for how to display missing translations in the frontend as well. It's how we know what other pages exist so we can put them in the sitemap as alternates (which was kind of a pain, had to totally take over output from the plugin) as well as listing them in <head> as <link rel="alternate"> tags

createI18nPages is where the real page generation happens. The gist is, make a primary page, then make /:locale/:url pages for all available translations. each page needs an array of translations, and reqs were to show the default translation if none was available

@vcarl
vcarl / structure.md
Created April 23, 2015 21:31
React Project folder structure
  • src
    • app.jsx
    • routes.jsx
    • components
      • App-wide reusable components
    • views
      • One folder per view
      • login
        • index.jsx
  • components
@vcarl
vcarl / userTimingMiddleware.js
Last active February 8, 2024 05:05 — forked from clarkbw/redux-performance-mark.js
A User Timing middleware for redux to create performance markers for dispatched actions
const userTiming = () => (next) => (action) => {
if (performance.mark === undefined) return next(action);
performance.mark(`${action.type}_start`);
const result = next(action);
performance.mark(`${action.type}_end`);
performance.measure(
`${action.type}`,
`${action.type}_start`,
`${action.type}_end`,
);

I bundled these up into groups and wrote some thoughts about why I ask them!

If these helped you, I'd love to hear about it!! I'm on twitter @vcarl_ or send me an email carl.vitullo@gmail.com

Onboarding and the workplace

https://blog.vcarl.com/interview-questions-onboarding-workplace/

  • How long will it take to deploy my first change? To become productive? To understand the codebase?
  • What kind of equipment will I be provided? Will the company pay/reimburse me if I want something specific?