
Making Pulled Pork with React Native, Expo, and Express - dceddia
https://daveceddia.com/perfect-pulled-pork-react-native-expo-express/
======
Alupis
The takeaway piece at the end really hit-home for me:

    
    
        I think it’s important to work some fun into programming projects.
        Give yourself permission to build something that already exists,
        if only to learn how to build it yourself. It doesn’t have to be
        a big serious project, or a perfect portfolio piece.
        
        And on that note, don’t be afraid to hack things together. It’s
        a fun project! Write some terrible code that you know is terrible.
        Don’t stress so much about perfect abstractions and Best Practices
        and feeling like you have to incorporate every new library and tool.
        It’ll be fine. You can always refactor it when you write the blog post ;)
    

I can't even count the number of similar, fun projects I've started... but
which turned into stress centers that felt more like chores than leisure,
causing them to never be completed. Often I end up worrying about the "best"
way to do something or start planning for when the project is huge and needs
to be well formed; paralyzed before I even get the code working.

~~~
dceddia
Damn, yeah. Same here. That little voice of "is this really the BEST way" has
grown stronger and stronger over the years, and I kinda have to fight it back
to "allow" myself to do little hacky projects like this.

I always wanted to be better at software engineering, and software _design_ ,
and getting abstractions right, and all that stuff. I've slowly gotten better
at all that, but I didn't know it would come with the tradeoff of being unable
to switch it off.

~~~
HeyLaughingBoy
That ability to switch it off is _very important_. A couple months ago, one of
my co-workers was asked to do something quickly for an important customer. I
would normally be the one to work on that codebase, but I was busy with
something else. I gave him some suggestions, made it completely, crystal clear
that hacks were allowed since the customer needed it by the next day at the
latest and it only had to run for a few hours and we could use the excuse that
it wasn't under version control if they wanted changes later.

He's a very good engineer and this was well within his ability, but he became
hamstrung by the hackiness. He continually complained that it would be
unsupportable (I know), that he would be asked to make changes (no: this was
explicitly part of the agreement with the customer) and it was a bad design
decision (yes!).

By the time 4 o'clock rolled around, he had made little progress on his well
engineered and future-proof solution and I didn't want to be there late, so I
offered to take it from him, finished the hack by 4:30 and pushed it to the
customer.

Customer loved it; greatly appreciated that "we had dropped all our work to
put two engineers on their project" and it did exactly what they needed to
demo their own product.

I guess my point is that engineering is about getting stuff done. Sometimes,
if you know time is more important than anything else, your only choice is
either cut corners or don't ship. Being a day late can be the same thing as
never shipping in some cases.

~~~
sixdimensional
I agree with your approach here. However, there's one interesting problem we
always run into with that approach and it's what causes the discontent, I
think.

It's when something that is being designed and built with the intention of a
short lifespan ends up being around for a long time, and causing problems for
longer than it was intended to exist at all.

And I think this happens all the time.

I think you did the right thing (I would have too), but unless you have solid
consistency, work ethics and a great memory, you may put in that quick fix and
it never gets improved.

If the quick fix stands the test of time, then it was the right fix regardless
of how fast it was done.

I guess that is why I have grown into the approach over the years of always..
ALWAYS checking expectations thoroughly, even when it hurts a little.

It's important in the early stages of problem analysis to know - 1) how long
do I have to analyze the problem? 2) how long do I have to implement a
solution to the problem? and 3) how long does the solution need to last? Of
course there are a million other questions, but I think it needs to start
there. Of course, while answering those questions, as a service function, we
must always be thinking... hands down.. what is in the best interest of the
customer (which can be subjective, but it must always be the forefront)?

If you are given constraints for those 3 things, you can more accurately come
up with an appropriate solution. My experience with this is hard-earned from
just doing and always having to get creative.

Sometimes, I plain ask people - do you want a long-term solution, or a short-
term solution? If you can come up with 3 options quickly based on your
experience - short/mid/long-term and give the pros and cons, I've found most
business users like this approach. Some prefer to just be given an answer and
have the issue handled immediately - however, that isn't always the best for
them nor the people doing the work. But, as they say, sometimes it comes down
to "needs must".

~~~
semi-extrinsic
There are few things as permanent as a temporary solution.

~~~
aldanor
When I see yet another “# TODO: this a hack, it’s doesn’t really work but
we’ll fix it asap anyway” I like to make bets with myself as for what date I’m
going to see in git blame. Today I’ve replaced one such 3yr old todo with
another todo that someone else will probably discover three years from now.
The reality...

------
BrentOzar
Given the hype with AI, I was seriously expecting a section of this to be
taking pictures of the pork itself, and then using machine learning to figure
out whether to turn the heat up or down.

So, just in case you're feeling guilty for over-engineering this, it could
have been WAY worse, hahaha. This is the just-right level of overengineering.

~~~
dceddia
I considered, for a very short while, trying to do some sort of OCR on the
image to pull out the thermometer temperature and graph it over time. But that
seemed a bit crazy. My first thought was
[https://xkcd.com/1425/](https://xkcd.com/1425/).

~~~
poxrud
You should check out Tesseract. You can do a lot with just running a cli
command on your image.

------
ljm
I have to admit that my first thought upon reading the title was that this was
some satirical piece about the way some people announce or describe their
software.

"Doohickey - CLI app written in C++, Boost, and the STL"

"whatchamacallit - an admin module written in JS, React, React Saga,
Storyboard, Redux, Express, nginx, Electron and markdown"

"mugabe-rails - a library written in Ruby to parse JSON"

"lasagne - a meal made using cow, spaghetti, and tomato"

Instead, what I took away from it was something much more insightful and
mature. He pretty much defined his most minimal MVP, committed to getting that
working, and completely dispensed with the notion that he had to invest in the
more fancy tech up front. He got a working solution for his problem and if
needs be, it can be made fancier now it actually works for him.

~~~
dceddia
Hah, thanks! I had a tough time coming up with a title for this. The pulled
pork was the star of the story, and this project wouldn't have existed without
it, so I went with that in the title. I tried to come up with something more
generic but it was tough.

------
boomskats
For years I've been wanting to write something that lets me use a cheapo
webcam to plot timeseries temperature data from cheap (ie. non broadcasting)
thermometers and thermocouples, something like the Chris' Coffee E61 grouphead
digital thermometer[1] I have attached to my espresso machine.

Like you I was also keen to automate my WSM smoker, and ended up buying a £20
Inkbird PID controller[2], hanging the thermocouple off the lid and hooking
the 12v relay output directly to an old case fan attached via ducting to one
of the vents. For I now get temperature stability to +/\- 3 degrees C, and
fuel that used to last 3 hours now lasts 11!

My 2c aside, I really enjoyed reading your writeup, and I wouldn't have stuck
with it and learnt as much had your chosen subject not been so close to my
heart.

[1][https://www.chriscoffee.com/e61-digital-thermometer-
adapter-...](https://www.chriscoffee.com/e61-digital-thermometer-
adapter-p/sss-04.htm)

[2][https://www.amazon.co.uk/Inkbird-Temperature-Controller-
Ther...](https://www.amazon.co.uk/Inkbird-Temperature-Controller-Thermostat-
Thermocouple/dp/B00ADEJVXK/)

~~~
dceddia
Thanks! Glad you enjoyed it. Your project sounds great, I've toyed with the
idea of adding a PID/fan to this smoker somehow. The ones I had seen (from
looking into adding a PID to a Rancilio Silvia) seemed awfully expensive, but
hey, £20 ain't bad. I might just try this ;)

Another application I want to apply a PID to is coffee roasting, but that's a
whole other kettle of fish.

EDIT: Oh wow, this one is only $16! [https://www.amazon.com/Inkbird-All-
Purpose-Temperature-Contr...](https://www.amazon.com/Inkbird-All-Purpose-
Temperature-Controller-Fahrenheit/dp/B00OXPE8U6)

EDIT 2: Based on a review, it sounds like that $16 one won't measure
temperatures above 210F. Bummer.

------
jasonparallel
I'm a heater meter fan myself (with a combination blower damper)

[https://github.com/CapnBry/HeaterMeter](https://github.com/CapnBry/HeaterMeter)

~~~
dceddia
This looks like an awesome level of overkill. Right up my alley. Maybe I'll
build one of these next :)

~~~
ASalazarMX
Sorry, Bob. I can't make it to the BBQ event this year. My grill's CPU just
died.

~~~
mseebach
Meh. It's not real overkill if you don't have fail-over hardware.

~~~
ASalazarMX
Suppose we could make it triple-redundant and call it "The Raman Grill".

------
logfromblammo
For vegans and other vegetarians, it is possible to prepare green jackfruit
into a reasonable approximation of pulled pork. Most people use liquid smoke,
but if you can use the nerdified grill process to perfectly smoke your
jackfruit with actual smoke, so much the better.

------
fhood
Pressure cooker + liquid smoke. 9/10ths as good.

Disclaimer: I say this as a firm believer in the power of charcoal.

~~~
dceddia
The recipe I followed (AmazingRibs' Perfect Pulled Pork [0]) mentions a "fast
method" that involves smoking for 2 hours with lots of smoke, and finishing in
the oven. I wonder if smoker + pressure cooker would be even faster and still
get the benefits of the smokiness. I guess it still wouldn't have the bark but
it sounds like an experiment I'll need to try.

0: [https://amazingribs.com/tested-recipes/pork-chops-pulled-
por...](https://amazingribs.com/tested-recipes/pork-chops-pulled-pork-ham-and-
more-pork-recipes/perfect-pulled-pork-recipe)

~~~
gcheong
Cool project! I've done the "low and slow" part using sous-vide then a chill
bath and a quick smoke on the grill for bark. Same time-frame (probably even
longer) but just a bit more convenient with the precision temperature of the
sous-vide. [https://www.seriouseats.com/2016/07/food-lab-complete-
guide-...](https://www.seriouseats.com/2016/07/food-lab-complete-guide-smoky-
sous-vide-pork-shoulder.html)

------
davidkuhta
Neat project, but thanks for making me hungry in the afternoon :P

+1 for OP's thermometer manufacturer Thermoworks, I'm a happy customer as well
(and unaffiliated).

As an aside, if you're in the market for an electronic temperature measurement
device, they're currently running a Father's Day Sale.
([https://www.thermoworks.com/](https://www.thermoworks.com/))

~~~
dceddia
Thermoworks is great. I think my first experience with them was their
Thermapen product. It's awesome for checking internal temperatures damn near
instantly.

------
fishbone
Dave, you should get a Weber Smoky Mountain instead of a Kettle and then you
won't need React Native. :-)

Nice article, thanks for sharing!

------
emilfihlman
I couldn't tell if Pulled Pork referred to actual pulled pork or, as I
assumed, to some new framework.

~~~
saalweachter
I was really, really relieved that it was, in fact, pulled pork.

There are only so many namespace collisions I can deal with; that isn't one of
them.

------
canadaj
Neat, I'm a huge fan of anything in the intersection of programming and bbq.

------
davidw
Besides a thermometer that can be read remotely, if you've got the money, a
pellet smoker seems like the way to go: the heat and smoke come from actual
wood being burned, but you can set the temperature and let it keep it there.

~~~
lr4444lr
I have one. I like it a lot. I don't think they can hit quite the quality as a
manual charcoal / wood vertical smoker except possibly at brands the higher
end (above $2000, mine cost about 1/4 of that), especially if you like a deep
rich smoke flavor, but for the convenience you get for the ease of use if you
don't have the time to hone your pit skills (not to say a pellet grill doesn't
have its own learning curve), I think it's worth the trade-off. Also, they are
electro-mechanical devices kept in the outdoors and prone to the malfunction
that you'd expect if not carefully maintained. Good companies have strong
warranties, but some don't.

------
hoistbypetard
Nice.

Though I have to say, my favorite pulled pork hack involves C, PHP, an
Arduino, a Pi, a couple of thermocouples, and a fan controlled by a solid
state relay[1].

[1]
[https://github.com/CapnBry/HeaterMeter/wiki](https://github.com/CapnBry/HeaterMeter/wiki)

Yours is simpler, and the photo part is really nice. But the fan control on
the heatermeter project adds a whole other dimension.

------
aphextron
When all you've got is a hammer...

~~~
dceddia
Really just wanted to learn how to use the hammer, in this case. But still,
yeah... you're not _wrong_ ;)

~~~
noveltyaccount
I was really looking forward to the part where you used servos to open and
close the vents with a PID algorithm. Maybe v2 :)

~~~
dceddia
Thought about it...

I've seen some people using a fan that they modulate with a PID to control the
temp, which is on my list of "someday maybe" projects, heh. I wanna say
there's even an existing product that does this, but I forget the name.

~~~
jeremy7600
Flame Boss and CyberQ/PartyQ/DigiQ

~~~
NoNotTheDuo
And PitmasterIQ

------
monksy
As long as this pulled pork doesn't include the use of Mustard I can approve
this.

~~~
dceddia
No mustard. Sprayed with water before applying the rub. Added BBQ sauce
sparingly to the final result.

I must admit though, that I forgot to apply the rub before I put it on the
smoker! (7am me was groggy, and rushing) So I applied it about 30 minutes into
the cook. Surely not optimal, but it came out delicious anyway so hey,
whatever :)

~~~
jeremy7600
I've done very similar actions at 5 and 6am :D

I would recommend rubbing with oil before the rub, and not water. Most
seasonings are oil-soluble and will work better if you've oiled them first.

------
ksrm
Why would such a simple app crash?

------
curiousgal
> _Or: Taking a Picture Every 30 Seconds and Sending It To A Server._

