Posts

Showing posts from November, 2023

Ye lowly ole' html checkbox

Ye lowly ole' checkbox Often when developing with frameworks like React we use html elements like checkbox (input type="checkbox") as "connected" controls and don't depend on or avail of the default html behavior  (by connected, I mean using useState to track the checked/unchecked state of the checkbox). Also worth noting we often use custom components which wrap the html element. But react-router v6.4 and above requires you (using the standard flow of Form to action function handler) to depend on the default/native html element behavior because react-router follows standard web patterns for form handling and submission (which is a good thing). For checkbox that  native html element behavior  is: use the name attribute to give it a name and if it's checked the name will be submitted in  the form data  by default if the checkbox is checked when submitted, then the form submitted will contain: <name>=on "on" is just the default html checkbo

Github Universe 2023 keynote

Keynote Github universe keynote by Thomas Dohmke, CEO Big emphasis on copilot. "Github founded on git. Github refounded on Copilot" 55% faster developers 37k orgs using it starting point is copilot, vision is Copilot X,  The keynote Copilot chat demo was impressive. The inline chat and diff view was very cool. I've been using the company Instance of chatgpt and I like the conversational style Bringing Copilot chat to android and ios github mobile and also other ides such as jetbrains Upgraded to GPT-4 Copilot integrate to github.com and showed how integrates with PRs.  new icon in PR showed generate tests for PR and added to PR secret scanner Next presenter talked about "fine tuning" copilot in your github codebase and partner integrations then Accenture cto talked about their use of copilot CEO of MSFT joins live onstage "we are a platform company" he's an impressive guy, CEO of msft, done amazing for msft turns out MSFT buying github was a genius

call openAI provide github PR feedback hackathon

For Opentables 2023 October Hackathon I proposed integrating with openAI api to get feedback on github PRs .  I'd already used the chatGPT interface to get feedback on code or write tests and it's good. I know there are github Actions out there which do similar but I wanted to hack a solution for our companys setup and also to learn. Another engineer thought it was a fun idea and joined me in this hack.  My initial idea was to:  create a github Action which triggers off PRs and  call github to get the PR code call the openAI chat api and passes it the code call github to add a comment to the PR One challenge with this was that would be running externally and would not have access private data needed to access things. So we pivoted to running the steps inside our CI build system instead. This gave us github triggers such as PR opened and also secure access. To get access to the PR number we had to enable a feature in the CI, but I did and it worked! We used bash scripts and I wa