Devi annullare delle modifiche? Devi ritornare a uno stato precedente? Git reset è un comando molto potente che permette di tornare indietro e riscrivere la storia.
I 3 tree di git
Per capire git reset cosa fa, dobbiamo avere ben presente i tre “tree” di git.
Working Directory – La cartella di lavoro
Index – Il contenuto del prossimo commit che verrà fatto.
HEAD – Puntatore al branch attivo.
Git reset –soft
Questa è la prima variante del comando reset. Questa opzione sposta solamente HEAD al commit indicato col comando.
git reset commitid --soft
Git reset –mixed
Questa seconda variante è quella di default, quando non viene specificato altro. In questo modo git opera anche sull’INDEX. Viene quindi eseguito quanto fatto nella variante SOFT e in più viene riportato INDEX al contenuto del commit scelto.
git reset commitid --mixed
Git reset –hard
La terza variante, –hard, aggiunge un ulteriore step a quanto fatto dalla –mixed. Git opera anche nella working folder, riportandola al contenuto del commit indicato.
Azure Feeds used to be scoped to an organization. However, to enable public feeds and to become more consistent with the rest of Azure DevOps, feeds created through the new create feed UI are now project-scoped.
The only way to create an org-scoped Azure Artifact Feed is through API calls and it’s not reccomended.
If we want to share a feed with an entire organization this is what we need to do.
The Microsoft Visual Studio Setup Project is an old technology to create installer developed by Microsoft. It is out of support from nearly a decade and not present in Visual Studio anymore but when I visit customer sites I find legacy technologies and I need to deal with it on the short-term.
A couple of days ago I was working on an automated CI build on Azure DevOps and we hit an issue when trying to compile an old VDPROJ (migration to Wix in progress, btw ☺). We encountered an HRESULT 8000000A error.
When we develop web-application or experiment with some technologies it’s quite common to need a certificate. A certificate for real world scenarios can be expensive and it’s over-engineering for testing purposes. So with this simple PowerShell script (on Windows) we can create a self-signed certificate for development enviroments.
With these few line of codes we create and store a self-signed certificate in the Windows Certificate Store. With the last line (Export-PfxCertificate) we export the certificate for furher use for example to do some experiments with cloud providers.
In this we install a private agent to build and deploy our project.
VSTS provides hosted agents to build and deploy. When we use a hosted agent, Microsoft takes care of the maintenance and upgrades. So for many teams this is the simplest way. Every agent has a set of capabilities that indicate what it can do. Capabilities are name-value pairs that are either automatically discovered by the agent software, in which case they are called system capabilities, or those that you define, in which case they are called user capabilities.
If the hosted agents do not suit our needs we can setup our dedicated agent and that’s the topic of this post.
I’m sure we all hear about unit testing, test driven development and so on. These practices are useful and provide a long list of benefit like writing low-coupled and mantainable code to name a few.
We want to write unit test for our UWP Prism application and we’d like, for example, to put our ViewModels under tests to make sure the logic they implement is correct. Unit testing is possible only if we can get rid of all the dependencies in our class under test because we want to run our test every time we want (for exemple when the service library our teammate is writing is not yet finished) and as fast as we can.
Count if at all possible. Compute when you can’t count. Use judgment alone only as last resort. (Steve McConnell)
Count-first is the approach that Steve McConnell suggests in his Software Estimation book.
If you can count the answer directly you should that. […]
If you can’t count the answer directly, you should count something else and then compute the answer by using some sort of calibration data.
Reading about this approach makes me think about how I estimated things in the past. My job is changing and the tasks of estimating and scheduling are more frequent. I know that software estimation is hard and crucial for every project to succeed.
If you, like me, are having troubles on software estimation I strongly recommend Steve McConnell’s books “Software Project Survival Guide” and “Software Estimation”. They are like strong related cousins; you’ll be a better software project manager if you know how to estimate and you’ll estimate better if you know how a software project has to be done.