John Neilson Carpenter was born in 1894 on 10th November at 7 Kelvinside Terrace West. This is located just north of the Kelvin above The Sixty Six Steps:

The view above is from the north-west, the Kelvin runs through the middle from bottom to top, modern Queen Margaret Drive running across the middle from left to right. John’s birthplace is circled in red. There’s an interesting blog about the early development of the area (link) which includes this image which appears to be a view from a little further up the terrace:

John’s father was Thomas Farrell Carpenter. At the time John’s was born he gave his occupation as ‘iron salesman’, although in the 1891 Census he worded it slightly differently as ‘commercial manager to iron and steel manufacturer’.
He married Jane Dunlop in 1886 and they had at least two children before John, Thomas Dunlop Carpenter (born 1887) and Jane Howard Carpenter (born 1890).
When John was aged 2, his father died suddenly at home aged 39 on 28th September 1896. The cause was recorded as ‘sudden apoplexy’. My interpretation is that apoplexy was a term used for any sudden catastrophic event without a clear underlying cause. Possible explanations include a stroke or heart attack.
The family was still in the flat at Kelvingrove Terrace West in 1901 with Jane, the widow, described as ‘Living on own means’. She had sufficient funds to afford a servant, 25-year old Mary Morrison. The other notable feature is that John’s name is recorded as Jack.
Whatever Jane’s ‘own means’ were they allowed her to buy a villa called Northcote on Boclair Road in Bearsden before the 1911 Census; I suspect this to be number 8.

Her eldest son, Thomas, was clerk in an iron works. Her daughter Jane was 20 and with no occupation and 16-year-old John was at school (he attended Hillhead High School, then Glasgow Academy). He was a keen rugby player.
According to the Glasgow University website (link, original text from Hillhead High School War Memorial Volume): “His outstanding ability in Mathematics and Science pointed to engineering as a suitable sphere of activity, and he became indentured with Messrs Yarrow & Co, Scotstoun. Around the same time, aged 17, John enrolled as an evening student of the Glasgow and West of Scotland Technical College, forerunner of the University of Strathclyde. The College register for session 1911-1912 records his occupation as “Engineer” and his subject of study as Engineering Drawing. He subsequently studied at the University of Glasgow 1912-1913, continuing to study Engineering.”
John worked at Yarrows Shipyard in Scotstoun from about 1911 to 1914. Yarrows was a huge concern, having relocated from London where the narrow river was becoming less suitable for shipbuilding between 1906 and 1908. This map from the time shows its somewhat rural location:

And here is the equivalent view today:

Among other points you can see the curve of Queen Victoria Drive on both photos, as well as the 1914 Glasgow Agricultural Society Show Ground, now the Scotstoun Stadium.
On the declaration of war in August 1914 John joined the Highland Light Infantry in the 17th Battalion also known as the Chamber of Commerce Battalion with a high proportion of white-collar workers and students.
He was trained as an officer and promoted in May 1915; the battalion went into France in November 1915. Here is a photo of him from about this time:

In late March 1916, the battalion started to plan a night-time raid on the enemy trenches. John was selected to be second-in-command and out of 100 volunteers, 45 were selected to go into training. The section of trench was observed and duplicated behind the British lines so that the raiders could practice each night. A first attempt in early April failed when their movement was spotted in the moonlight and they had to crawl back across No Man’s Land. They tried again on the evening of 22nd April:
“At 9.30 p.m. our artillery suddenly opened on the enemy’s salient, and poured down on it such a tornado of steel as the Germans had never experienced before. For twenty minutes our shells flayed the German front line, and under this arch of shrieking explosives the battle party crawled right up to the rim of the bombardment. What wire remained uncut was blown to fragments by a torpedo, and when the barrage lifted and came down behind, the raiders jumped into the enemy’s trench and set to work. For twenty minutes they bombed and destroyed, cleared dug-outs, pulled down machine guns, barricaded communication trenches, and handed prisoners back to escorts. Then on a signal they as quickly [36]withdrew, and still under cover of artillery fire made their own trench again. Thirteen affrighted Germans, of two different units, accompanied the party; and, finest of all, every man of the party returned. Eleven of them were wounded, but only one seriously. Among those slightly wounded was Lieut. Begg, who was the spirit of the assault.” (source)
Alexander James Begg and John Carpenter were both awarded the Military Cross, awarded for an act of “exemplary gallantry” and ranking second to the more-famous Victoria Cross. Just over 37,000 were awarded in World War One (source), which sounds a lot but given the hundreds of thousands of men who served, it was still a rare achievement.

The Military Cross – I wonder where John’s is today?
This would have been well-known back at home and was reported across Scotland. I have picked the cutting from the Irvine Herald because it also quotes a letter home from a local man:

While the location of the 22nd April raid is not explicit, the battalion history states it was south-west of Thiepval, so probably in this sector of the front:

The German trenches are shown in red to the left, the British front line as a dashed black line. Just below the centre of the map you can see LEIPZIG SALIENT which was the British name for this feature, also referred to as the Leipzig Redoubt. The angle of the German line at the tip of the salient is called The Naze.
From the contour lines on the map you can deduce the Redoubt was on high ground and the following is the approximate view from the British trenches (possibly on the line of Campbell Avenue marked on the map):

This was to be the target for 17th HLI, John’s battalion, on the first day of the offensive that was to become known as the Battle of the Somme. We can now see the raid of 22nd April as a reconnaissance in preparation for this attack, finding about the enemy trenches, which regiments they had in the line, and so on.
The preparatory artillery barrage on the German lines for the start of the attack on 1st July lasted for days and planners were confident the Leipzig Redoubt would be secured in a few hours, with the British troops proceeding well beyond that (of the right-hand edge of the map above) to Mouquet Farm (which I feel sure they referred to as Mucky Farm).
Maybe to our surprise today, the planners were right and the front line trenches were captured quite quickly, but then things went wrong. While we only have accounts from the Scottish soldiers’ point-of-view, I suspect the German front line was quite lightly held, so when the HLI advanced to take the second line trenches, which had been less heavily shelled, they were mown down. In addition Germans started to emerge from deep dug-outs in the first line, even those that had had a bomb thrown in, to attack the Scots in the rear. By around this stage 22 officers and about 400 ‘other ranks’ (as they were called) were dead or wounded, at least half of those who attacked.
John Carpenter would have been leading a platoon (about 30-40 men, 3-4 platoons made up a company) in C Company and was killed advancing near the south face of the Leipzig Salient. We don’t know anything further, but officers did not carry rifles and would have been waving the men on to encourage them so he would have been an obvious target.
We also don’t know if his body was recovered for burial but if it was then the location was subsequently lost and he is commemorated on the Thiepval Memorial, one of 72,150 men with no known grave.

Photo credit to Pierre Magdelenne. The memorial is located a short distance from where John died – in the Google Earth view below the memorial is in the bottom-left corner and the Leipzig Salient is roughly in the area of the red circle:

On the Glasgow University website you can find a history of the actions in this sector on 1st July 1916 (link). Eighteen ex-students took part in the attack either with John in 17th HLI or in the neighbouring battalion, the 16th HLI. Sixteen were killed or wounded that day, and the two who survived the day did not survive the war.
Footnote
The Hillhead High School War Memorial Volume has an obituary of John as follows:

The address in the second line, 36 Falkland Mansions, is (I believe) the address John’s mother moved to after leaving Northcote on Boclair Road. This was her address when she died in 1951.