Hacker Newsnew | past | comments | ask | show | jobs | submit | carrigan's commentslogin

Hi all! I'm a software/hardware engineer at Yard Stick and am happy to talk more about what we've been working on if anyone has any questions.


It's be nice if you pointed to an article that was freely available.

For me it is a fascinating topic but also one I am skeptical about because soil carbon is distributed over such a wide area that measuring it is tough. It's important though because it is the "dark matter" of carbon on Earth in that there is an awful lot of it.


I agree that we need to cut back our current emissions. Even if we stopped emitting all greenhouses gasses tomorrow, the global temperature would continue to rise for decades before stabilizing, so there is still plenty of need to capture what we've already let out.

I'm fairly bearish on direct capture solving much though. It requires so much capital and energy just to replicate the carbon capture that we can already do just by growing plants. I hope that companies like Charm will also get significant funding to pursue using plants for the capture part.


The tandem component for direct capture is a clean energy source ala fusion or a solar price drop to a price point on par. So it would make sense to make continued research depending on fusion break throughs.


The most cost efficient way to do carbon capture is on the smoke stacks of coal power plants. Better than that is not burning the stuff in the first place. Both are way more efficient than these boondoggles trying to pull co2 out of the air where it exists at 400 ppm 0.04%. If we’re not doing the first two, why bother with the last?

There’s no logic in this.

I agree with you we’ll need to remove co2 eventually. But before we worry about that let’s focus editing on stopping making it worse. The payoff there is much higher!


What is Charm?


I don't believe that hardware constraints have anything to do with code quality. Running your code on a microcontroller will require your algorithms to run in a smaller RAM footprint and potentially come with timing requirements, but do not dictate that you write quality code to do so. You can solve those problems with thousands of lines of uncommented assembly efficiently, but that does not mean it is quality code.

I have worked for a significant time in my career as both an embedded engineer as well as a backend engineer, and in general I find that the backend code is way easier to read, maintain, and extend. Embedded code is seldom properly tested and most of it is written in C where people can abuse a library's contracts or the preprocessor. It is not uncommon to find functions that are over a thousand lines in the embedded world. Compare this to Rails where there are a ton of standards, short and succinct functions, and good support for testing.

I guess it depends on your definition of "quality code". If you mean code that is dependable and will do one thing well on one platform for the rest of time, then embedded code could be considered high quality. I would debate that these items have more to do with the binary than the code though. If you mean code that conveys how a program works well to other programmers, is under test, and follows some standard structure, I would pick modern app development as typically being much higher quality.


I don't know where this got a downvote from because it's correct - it's quite hard to build sensible automatic integration tests for embedded code unless you have the luxury of a full system emulation.

The only thing that resource constraint forces is less code, especially less dependencies, because you run out of space.

The Toyota "unintended acceleration" court case was a flagship example of bad embedded code, that we rarely get to see.


The Toyota computer is like a super computer compared to old mainframes. IIRC the Toyota program had 10k global variables updated by spaghetti C code. So you had a lot of space, enough to shoot yourself with C code. Old mainframe code in contrast often operated on records in a batch fashion, with a pretty clear input and output.

Of course, the antipattern on enterprise code comparable to thousands of global variables in C code, is to have thousands of columns in hundreds, or thousands even, of database tables, all intertwined and used only God knows where.


AFAIR, the were also autogenning code from a Matlab model of the engine, and that's where the 10k globals thing is from. Like yeah there's technically C code that's doing that, but come on.


Interesting, I thought the "unintended acceleration" was actually just floor mats creeping up and holding the accelerator pedal. Gonna have to google some stuff now :-)


https://news.ycombinator.com/item?id=9643204

It's one of those Rashomon situations where I'm not sure we can ever be entirely sure but it seems to have stopped.


Thank you for linking that. The comments in it share some terrifying stories.


That was Toyota's explanation for what was happening. Turned out to be a lie or a hasty conclusion, I don't remember which.


> I don't believe that hardware constraints have anything to do with code quality.

When the punishment for writing code that doesn't work is a long wait, you learn to write small pieces and test individually.


Location: Durham, NC

Remote: Yes

Willing to relocate: No

Technologies: Backend Development (Ruby, Elixir, and Python), Embedded Device Development (Firmware in C and C++, design and layout in Eagle and many others), Frontend Development (vanilla HTML+JS+CSS preferred but also experienced with React)

Resume/CV: https://www.linkedin.com/in/briancarrigan/

LinkedIn: https://www.linkedin.com/in/briancarrigan/

GitHub: https://github.com/carrigan

Email: brian@bcarrigan.com

I have been working as a mixed web and connected device freelance professional since last September and am open for contract based work or a full-time position at a hardware or IoT focused product shop.


Thank you very much! I'd love to hear about what you come up with for recipe management.


Right now I'm going very low tech for recipe management...I send a DM to my SO on slack. That's most of what we use the DM for, an archive of things we've made. We mostly need a bigger screen in the kitchen that stays on while making a recipe. A Microsoft Surface we have laying around will be used for that.

I'd like to do a database of products purchase, purchase date, price paid, scan a barcode and mark it as consumed, and calculate typical consumption rate of the products.

I will keep things pretty simple, either a sqlite database that stays local or a LAMP setup so I've got access to an inventory list at the store along with "price check" functionality.


I'm working on this idea too! Hit me up on gmail! Love to chat.


Apparently many grocery store chains offer APIs where you would be able to download information on what you bought. Anybody know more on this?


I checked Aldi and two regional grocery stores near me...no public API. One does have a delivery service, but that API is closed off it looks like.


Thank you for the kind words! I will echo slig and say that I have been really happy with the Rigol DS1054Z so far. I love that you can build a really capable electronics lab at home in 2018 for less than $500.


Any guides in getting started with an oscilloscope?



eevblog has an extensive collection of oscilloscope vids.


Micsig scope tablets are great too. Similar price and specs but they're also battery powered and portable!


Location: Durham, NC

Remote: Yes

Willing to relocate: No

Technologies: Embedded C/C++, Ruby, Elixir, Python, HTML, CSS, Javascript, PCB Layout

Résumé/CV: https://www.linkedin.com/in/briancarrigan/

Email: brian.c.carrigan@gmail.com

GitHub: https://github.com/carrigan

---

I started out my career as an embedded engineer for 5+ years, writing firmware in C/C++ and laying out circuit boards. During this time, I worked on learning web development and working with some friends on a real estate startup, and eventually made full-stack web development my full time job for the last 3 years.

I recently left my day job to begin freelancing on full-stack IoT projects. If you are a software company looking to make a device or a hardware company looking to bring your device's data online, I'd love to talk. I'm also available for full-stack web development work in any of the languages listed above.


Location: Durham, NC

Remote: Yes

Willing to relocate: No

Technologies: Embedded C/C++, Ruby, Elixir, HTML, CSS, Javascript, PCB Layout

Résumé/CV: https://www.linkedin.com/in/briancarrigan/

Email: brian.c.carrigan@gmail.com

GitHub: https://github.com/carrigan

---

I got my degree in Electrical Engineering and practiced as an embedded engineer for 5+ years, writing firmware in C/C++ and laying out circuit boards. I spent my spare time learning web development and working with some friends on a real estate startup, and eventually made full-stack web development my full time job for the last 3 years.

I recently left my day job to begin freelancing on full-stack IoT projects. If you are a software company looking to make a device or a hardware company looking to tie your device into the web ecosystem, I'd love to talk.


I go through this cycle every 6 months or so where I will get excited about Rust and try it out for embedded development again. Typically in the first day, I get frustrated with some major limitation and put it back on the shelf. This last time, I wanted to make a simple timer that displayed the time since a button was last pressed on a 16x2 character LCD screen.

In addition to the HAL annoyances that turbinerneiter talked about, I wound up giving up this time because I could find no way to manipulate strings in a static buffer. In C I could just allocate two 17 byte strings statically and then `sprintf` to them, but there seems to be no equivalent in Rust.

I'd be curious to know what limitations others have run into when trying this and if I was just doing it wrong.


The write! macro would be the equivalent here. Something like this:

    use std::io::Write;
    
    static mut S1: [u8; 17] = [0; 17];
    
    fn main() {
        unsafe {
            write!(&mut S1[..], "Hi: {}", 5).unwrap();
            
            let s = std::str::from_utf8_unchecked(&S1[..5]);
            
            println!("string: {}", s);
        }
    }


Having all your main inside unsafe doesn't seem like the best advert for Rust :)


You're right, it's not; I was just showing the smallest code. :)

This is unsafe specifically because of the mutable static; you can deal with that in a few different ways, but that wasn't the point of the example.


This is exactly what I was looking for; I had only checked the String and &str documentation and didn't think to look for a macro. Thanks :)


No problem! It is slightly obtuse, given that you store a u8 buffer and then make &strs from it, rather than storing a &str.


If anyone is interested in using Single Transferable Vote for unofficial uses, I recently wrote an implementation in Elixir and wrapped it in a small JSON API. It is a toy in its current state (it uses cookies to see if people have voted and the link to close an election can be somewhat easily found even if you are not the creator of the election) but we use it around or office for a few things and I would be interested in continuing work on it if anybody would like to jump in. I have an instance of this running on my site; ping me if you'd like to try it.

STV Algorithm: https://github.com/carrigan/elixir-stv Phoenix API: https://github.com/carrigan/vote-service


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: